Class Operator - code generator for Visual C++ and MFC

  1. The purpose of the program 
  Class Operator is code generator tool.  It will parse your *.h file(s) and generate code for
  serialization, operators =, ==, <, >, Copy constructor and other.
  It has also logic for solving code for CPtrList like members - > special serialization ...  

  2. How to install the program.
  Unzip (you probably already did it) program to any directory you like.

  3. How to use the program:
  Run program
  Click on menu Class - Add
  Select example.h provided with the program

  In the left list box you see the name of the class.

  Rigth Top list box - here is list of all members with picture - (static, pointer, const and so ..)
                       and code generator suggested status
  See CPtrMembersDataList has grey checked square: it means CO knows it is from CPtrList because on the top of 
  example.h file was typedef CTypedPtrList<CPtrList,CMembersData*> CPtrMembersDataList;
  The grey square means - it will be treated differently in code generator (if you have checked enable looking for CPtrList)

  The other members have white square, some of them unchecked.
  Checked will go into the code generator, unchecked will be not included.
  (for example CMyDoc or CView - you don't want to serialize document or view)

  You can click on the square before you go to Code Generator to change its status.
  
  Note:
  The grey square means special treatment: for example in serilaization of m_Something
  it will put m_Something.Serialize(); rather than ar << m_Something;
  In CPtrList like it will do all necesary code to support list.

  Example (using example.h):
  Try this: leave CPtrMembersDataList grey and Checked and go to menu Generate - Serialization;
  Look at the code - the m_pMemberList will be treated as list with all the supporting code.

  Go back and change status of m_pMemberList to white checked square clicking (2 times) on the square.
  Generate Serialization: Now m_pMemberList will be supported only by m_pMemberList->Serialize(ar);

  That is the idea.

  You can load whole directory of your *.h files so you will have all the classes in listbox on the rigth side.
  
  Checkbox Enable looking for CPtrList - leave it Checked. If it is unchecked it will not generate any additional 
  code for CptrList like members even if the status is checked gray square. 
  
 
  4. The status of the program 
  This program is free. You can support me by buyng my other program: mclip - windows clipboard extension.
  www.cyberus.ca/~oscarko/mclip.shtml
  
  5. The distribution status of the program.  
  Freely. 
  You can drop me an e-mail if you going to include this program on a CD compilation, but you don't have to.

  6. How to contact the author in the event of questions or problems and for info.
  Contact me via e-mail:
  oscarko@cyberus.ca
  oscarko@usa.net
  http://www.cyberus.ca/~oscarko/mclip.shtml
  
  
  Known Bugs:
  Expect bugs. It works for my code, but it doesn't have to for yours. 
  As my coleague says: It has pattern recognization.

    
  Yes, it goes into different *.h documents to get some idea about base class if it doesn't find it in the current *.h file, but
  don't expect too much.




Tips:

  Include Class Operator into Developer Studio:

  Menu: Tools/Customize, tab Tools

  in Menu Content add new item: Class Operator

  Fill the empty edit fields:

Command:  browse to the path of COPerator.exe
          (for example): I:\DevStudio\bin\COperator.exe

Arguments: $(FileDir)\$(FileName).h

Initial Directory: $(CurDir)


Now in the menu Tools you will have Class Operator item.

