Changeset 637 in dev for trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h
- Timestamp:
- Jun 11, 2008, 10:10:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h
r603 r637 2 2 3 3 //定数 4 class CConst : public Symbol, public Jenga::Common::ObjectInHashmap<CConst> 4 class CConst 5 : public RelationalObjectModuleItem 6 , public Jenga::Common::ObjectInHashmap<CConst> 5 7 { 6 8 Type type; … … 14 16 trace_for_serialize( "serializing - CConst" ); 15 17 16 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol ); 18 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( RelationalObjectModuleItem ); 19 20 if( ActiveBasic::Common::Environment::IsRemoveExternal() ) 21 { 22 if( this->IsExternal() ) 23 { 24 this->NeedResolve(); 25 return; 26 } 27 } 28 17 29 ar & BOOST_SERIALIZATION_NVP( type ); 18 30 ar & BOOST_SERIALIZATION_NVP( i64data ); … … 20 32 21 33 public: 22 CConst( const NamespaceScopes &namespaceScopes, const std::string &name, const Type &newType, _int64 i64data)23 : Symbol( namespaceScopes, name)34 CConst( const Symbol &symbol, const Type &newType, _int64 i64data) 35 : RelationalObjectModuleItem( symbol ) 24 36 , type( newType ) 25 37 , i64data( i64data ) 26 38 { 27 39 } 28 CConst( const NamespaceScopes &namespaceScopes, const std::string &name, int value)29 : Symbol( namespaceScopes, name)40 CConst( const Symbol &symbol, int value) 41 : RelationalObjectModuleItem( symbol ) 30 42 , type( Type(DEF_LONG) ) 31 43 , i64data( value ) … … 53 65 } 54 66 double GetDoubleData(); 67 68 virtual bool Resolve(); 55 69 }; 56 70 class Consts : public Jenga::Common::Hashmap<CConst> … … 69 83 public: 70 84 71 void Add( const NamespaceScopes &namespaceScopes, const std::string &name, _int64 i64data, const Type &type );72 void Add( const NamespaceScopes &namespaceScopes, const std::string &name, int value);85 void Add( const Symbol &symbol, _int64 i64data, const Type &type ); 86 void Add( const Symbol &symbol, int value); 73 87 74 88 private: … … 83 97 84 98 //定数マクロ 85 class ConstMacro : public Symbol, public Jenga::Common::ObjectInHashmap<ConstMacro> 99 class ConstMacro 100 : public RelationalObjectModuleItem 101 , public Jenga::Common::ObjectInHashmap<ConstMacro> 86 102 { 87 103 std::vector<std::string> parameters; … … 95 111 trace_for_serialize( "serializing - ConstMacro" ); 96 112 97 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol ); 113 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( RelationalObjectModuleItem ); 114 115 if( ActiveBasic::Common::Environment::IsRemoveExternal() ) 116 { 117 if( this->IsExternal() ) 118 { 119 this->NeedResolve(); 120 return; 121 } 122 } 123 98 124 ar & BOOST_SERIALIZATION_NVP( parameters ); 99 125 ar & BOOST_SERIALIZATION_NVP( expression ); … … 101 127 102 128 public: 103 ConstMacro( const NamespaceScopes &namespaceScopes, const std::string &name, const std::vector<std::string> ¶meters, const std::string &expression )104 : Symbol( namespaceScopes, name)129 ConstMacro( const Symbol &symbol, const std::vector<std::string> ¶meters, const std::string &expression ) 130 : RelationalObjectModuleItem( symbol ) 105 131 , parameters( parameters ) 106 132 , expression( expression ) … … 127 153 return expression; 128 154 } 155 156 virtual bool Resolve(); 129 157 }; 130 class ConstMacros : public Jenga::Common::Hashmap<ConstMacro> 158 class ConstMacros 159 : public Jenga::Common::Hashmap<ConstMacro> 131 160 { 132 161 // XMLシリアライズ用 … … 142 171 143 172 public: 144 bool Add( const NamespaceScopes &namespaceScopes, const std::string &name, const char *parameterStr );173 bool Add( const Symbol &symbol, const char *parameterStr ); 145 174 ConstMacro *Find( const Symbol &name ); 146 175 };
Note:
See TracChangeset
for help on using the changeset viewer.