#pragma interface #ifndef COMPONENT_H #define COMPONENT_H #ifndef MISC_H #include #endif #define _TLMP_component_walk class COMPONENT_WALK_INFO{ public: SSTRINGS sections; const char *section; // Current section const char *component; // Current component const char *func; // Current functag or fhelper int level; /*~PROTOBEG~ COMPONENT_WALK_INFO */ public: COMPONENT_WALK_INFO (void); /*~PROTOEND~ COMPONENT_WALK_INFO */ }; // Bits to filter the topics covered by component_walk #define COMPWALK_SEL_FUNCTAG 1 #define COMPWALK_SEL_FHELPER 2 #define COMPWALK_SEL_PROTOTYPE 4 #define COMPWALK_SEL_METHOD 8 #define COMPWALK_SEL_ALL 0xffff class PARAM: public ARRAY_OBJ{ public: SSTRING name; SSTRING type; SSTRING desc; /*~PROTOBEG~ PARAM */ public: PARAM (const char *_name, const char *_type, const char *_desc); PARAM (void); /*~PROTOEND~ PARAM */ }; class PARAMS: public ARRAY{ public: /*~PROTOBEG~ PARAMS */ public: PARAM *getitem (int no)const; /*~PROTOEND~ PARAMS */ }; struct _F_component_walk{ class _F_component_walk_private *priv; const char *getprop (const char *key); const char *getsummary (); const char *getdescription(); void getxml(SSTRING &s); // Get the Xml for a given context // Helper to change content void setdescription(const char *desc); void setsummary(const char *desc); void setreturn(const char *type); void setparams (PARAMS ¶ms); void setoptional (bool optional); void setobj (bool is_obj); void setname (const char *name); void addfunctag (const char *name); void addfhelper (const char *name); void addmethod (const char *name); void addprototype (); void addcomponent (const char *name); void delnode(); #define _F_component_walk_section(n) void n section(const char *name, const char *summary, const char *descrip, COMPONENT_WALK_INFO &info, bool &end, bool &skip) virtual _F_component_walk_section( ); #define _F_component_walk_component(n) void n component(int no, const char *name, const char *summary, const char *descrip, bool is_obj, COMPONENT_WALK_INFO &info, bool &end, bool &skip) virtual _F_component_walk_component( ); #define _F_component_walk_prototype(n) void n prototype(int no, const char *name, const char *rettype, const char *descrip, COMPONENT_WALK_INFO &info, bool &end, bool &skip) virtual _F_component_walk_prototype( ); #define _F_component_walk_functag(n) void n functag(int no, const char *name, const char *rettype, const char *summary, const char *descrip, bool optional, COMPONENT_WALK_INFO &info, bool &end, bool &skip) virtual _F_component_walk_functag( ); #define _F_component_walk_fhelper(n) void n fhelper(int no, const char *name, const char *rettype, const char *summary, const char *descrip, COMPONENT_WALK_INFO &info, bool &end, bool &skip) virtual _F_component_walk_fhelper( ); #define _F_component_walk_method(n) void n method(int no, const char *name, const char *rettype, const char *summary, const char *descrip, COMPONENT_WALK_INFO &info, bool &end, bool &skip) virtual _F_component_walk_method( ); #define _F_component_walk_param(n) void n param(int no, const char *name, const char *type, const char *descrip, COMPONENT_WALK_INFO &info, bool &end, bool &skip) virtual _F_component_walk_param( ); }; #define _TLMP_component_find struct _F_component_find{ #define _F_component_find_onecomp(x) void x onecomp(const char *path) virtual _F_component_find_onecomp( )=0; }; #define _TLMP_spec_walk struct _F_spec_walk{ class _F_spec_walk_private *priv; #define _F_spec_walk_onespec(x) void x onespec(const char *key, const char *fname, const char *text, int noline, const char *section, bool &end) virtual _F_spec_walk_onespec( )=0; }; #endif