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

macro.h

Go to the documentation of this file.
00001 #ifndef macro_h
00002 #define macro_h
00003 
00004 #include "tag.h"
00005 #include <list>
00006 
00008 
00013 class Macro : private Tag
00014 {
00015  private:
00016   std::string name;
00017   std::string text;
00018   std::string call;
00019 
00020   bool hard;
00021   bool definition;
00022   bool is_valid_tag;
00023 
00024   typedef struct PMap
00025   {
00026     std::string first;
00027     std::string second;
00028     PMap( std::string f, std::string s ) : first(f), second(s) {}
00029   };
00030 
00031   typedef std::list<PMap> parameter_list;
00032   typedef parameter_list::iterator parameter_list_it;
00033 
00034   parameter_list parameters;
00035   bool par;
00036 
00037  public:
00038   Macro( Line& line );
00039   Macro() : Tag() {}
00040 
00042   bool operator!() const
00043     { return !is_valid_tag; }
00044 
00046   bool is_definition() const
00047     { return definition; }
00048 
00050   bool is_call() const
00051     { return !is_definition(); }
00052 
00054 
00055   std::string get_name() const
00056     { return name; }
00057 
00059 
00060   std::string get_text() const
00061     { return text; }
00062 
00064   std::string get_text( Macro def_macro );
00065 
00067 
00068   std::string get_call() const
00069     { return call; }
00070 
00072   bool is_hard() const
00073     { return hard; }
00074 
00076   bool is_soft() const
00077     { return !hard; }
00078 
00080   std::string get_tag() const 
00081     { return Tag::get_tag(); }
00082 
00083   bool has_parameters() const
00084     { return par; }
00085 
00086   int get_level() { return Tag::get_level(); }
00087 };
00088 
00089 typedef std::list<Macro> macro_list;   
00090 typedef macro_list::iterator macro_list_it; 
00091 
00092 #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