Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

matrixtree.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 *
00003 * Title:     MatrixTree
00004 * Filename:  src/matrixtree.h
00005 * Generated: February 26, 2004 @ 21:00:38
00006 *        by: GENTREE - Generates C++ command tree header files for GLITCH.
00007 *
00008 * WARNING! All changes made in this file will be lost!
00009 *
00010 *******************************************************************************/
00011 
00012 #ifndef __MATRIXTREE_H__
00013 #define __MATRIXTREE_H__
00014 
00015 
00016 #include <qgl.h>
00017 #include <qptrlist.h>
00018 #include <qstring.h>
00019 #include <qstringlist.h>
00020 
00021 #include "cmdtreenode.h"
00022 #include "cmdparam.h"
00023 #include "superptrlist.h"
00024 #include "supervaluelist.h"
00025 
00026 #include "enumparam.h"
00027 
00028 
00029 
00034 class MatrixTree : public CmdTreeNode
00035 {
00036 public:
00037     MatrixTree()
00038         : CmdTreeNode( "Matrix", new QPtrList<CmdTreeNode> )
00039     {
00040 
00041         // Trees
00042 
00043         // Commands
00044         mySubTree->append( new CmdTreeNode( "glMatrixMode", NULL, cmd_glMatrixMode, 
00045                             new SuperPtrList<CmdParam>( 1,
00046                                 new EnumParam( "mode", "5888", 
00047                                     SuperValueList<char*>( 2,
00048                                         "GL_MODELVIEW",
00049                                         "GL_PROJECTION" ),
00050                                     SuperValueList<int>( 2,
00051                                         GL_MODELVIEW,
00052                                         GL_PROJECTION ),
00053                                     "GLenum" ) ) ) );
00054         mySubTree->append( new CmdTreeNode( "glPushMatrix", NULL, cmd_glPushMatrix, NULL ) );
00055         mySubTree->append( new CmdTreeNode( "glPopMatrix", NULL, cmd_glPopMatrix, NULL ) );
00056         mySubTree->append( new CmdTreeNode( "glLoadIdentity", NULL, cmd_glLoadIdentity, NULL ) );
00057     }
00058 
00059     // Note: In the unlikely (but serious) event that too few elements exist in
00060     //       the list of strings that is passed, the QStringList class will
00061     //       catch and handle the case as appropiate.
00062 
00063     static void cmd_glMatrixMode( const QStringList& p ) {
00064         glMatrixMode( p[0].toInt() );
00065     }    static void cmd_glPushMatrix( const QStringList& ) {
00066         glPushMatrix();
00067     }
00068     static void cmd_glPopMatrix( const QStringList& ) {
00069         glPopMatrix();
00070     }
00071     static void cmd_glLoadIdentity( const QStringList& ) {
00072         glLoadIdentity();
00073     }
00074 
00075 
00076 private:
00077 
00078 };
00079 
00080 
00081 #endif // __MATRIXTREE_H__

Generated on Fri Feb 27 12:01:39 2004 for Glitch by doxygen 1.3.2