Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

macros.h

Go to the documentation of this file.
00001 #ifndef macros_h
00002 #define macros_h
00003 
00004 #include "precompiler.h"
00005 
00007 struct Precompiler::Macros
00008 {
00009 
00010   typedef struct MacroTag
00011   {
00012     MacroTag( Macro &m, Line &l ): macro(m), line(l) {}
00013     Macro macro;
00014     Line line;
00015   };
00016 
00017   typedef std::list<MacroTag> macro_tag_list;
00018   typedef std::list<MacroTag>::iterator macro_tag_list_it;
00019 
00020   macro_tag_list soft_definitions;
00021   macro_tag_list hard_definitions;
00022   
00023   macro_tag_list soft;
00024   
00026   int soft_definitions_num; 
00027 
00029   int hard_definitions_num; 
00030   
00032   int soft_num; 
00033   
00034   Macros() : soft_definitions_num(0), hard_definitions_num(0), soft_num(0) {}
00035 
00037 
00039   void add( Line &line );
00040 
00042   bool get_soft_definition( std::string name, Macro &macro );
00043 
00045   bool get_hard_definition( std::string name, Macro &macro );
00046 
00048   bool get_soft( std::string name, Macro &macro );
00049 
00051   bool get_definition( std::string name, Macro &macro )
00052   {
00053     if( get_soft_definition( name, macro ) )
00054       return true;
00055     if( get_hard_definition( name, macro ) )
00056       return true;
00057 
00058     return false;
00059   }
00060 
00061   // overrides a macro
00062   void override( Line &line );
00063 
00064 };
00065 
00066 
00067 #endif

Generated on Tue Nov 20 02:19:52 2001 for Leo<HTML> by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001