Changeset 299 in dev for trunk/abdev/BasicCompiler_Common/include/Type.h
- Timestamp:
- Aug 23, 2007, 6:17:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/Type.h
r293 r299 26 26 const CClass *pClass; 27 27 }; 28 29 // ジェネリクス クラス インスタンス型の場合に使う 28 30 GenericTypes actualGenericTypes; 31 32 // 型パラメータで使う 33 std::string formalTypeName; // 型パラメータの名前 34 int formalTypeIndex; // 型パラメータの引数番号 29 35 30 36 // XMLシリアライズ用 … … 44 50 { 45 51 ar & BOOST_SERIALIZATION_NVP( index ); 52 } 53 54 if( IsTypeParameter() ) 55 { 56 ar & BOOST_SERIALIZATION_NVP( formalTypeName ); 57 ar & BOOST_SERIALIZATION_NVP( formalTypeIndex ); 46 58 } 47 59 } … … 71 83 , index( type.index ) 72 84 , actualGenericTypes( type.actualGenericTypes ) 85 , formalTypeName( type.formalTypeName ) 86 , formalTypeIndex( type.formalTypeIndex ) 73 87 { 74 88 } … … 81 95 index = type.index; 82 96 actualGenericTypes = type.actualGenericTypes; 97 formalTypeName = type.formalTypeName; 98 formalTypeIndex = type.formalTypeIndex; 83 99 } 84 100 … … 176 192 bool HasMember() const; 177 193 194 // 型パラメータの名前を取得 195 const std::string &GetFormalTypeName() const 196 { 197 if( !IsTypeParameter() ) 198 { 199 Jenga::Throw( "型パラメータでない型に対してGetFormalTypeNameメソッドが呼ばれた" ); 200 } 201 return formalTypeName; 202 } 203 void SetFormalTypeName( const std::string &formalTypeName ) 204 { 205 if( !IsTypeParameter() ) 206 { 207 Jenga::Throw( "型パラメータでない型に対してSetFormalTypeNameメソッドが呼ばれた" ); 208 } 209 this->formalTypeName = formalTypeName; 210 } 211 int GetFormalTypeIndex() const 212 { 213 if( !IsTypeParameter() ) 214 { 215 Jenga::Throw( "型パラメータでない型に対してGetFormalTypeIndexメソッドが呼ばれた" ); 216 } 217 return formalTypeIndex; 218 } 219 void SetFormalTypeIndex( int formalTypeIndex ) 220 { 221 if( !IsTypeParameter() ) 222 { 223 Jenga::Throw( "型パラメータでない型に対してSetFormalTypeIndexメソッドが呼ばれた" ); 224 } 225 this->formalTypeIndex = formalTypeIndex; 226 } 227 178 228 // 未完成 179 229 const Type &GetDummyActualGenericType() const; … … 189 239 static int GetBasicTypeFromSimpleName( const char *variable ); 190 240 }; 241 typedef std::vector<Type> Types; 242 243 void ResolveFormalGenericTypeParameter( Type &typeParameter, const Type &classType, const UserProc *pUserProc = NULL ); 191 244 192 245 class GenericType
Note:
See TracChangeset
for help on using the changeset viewer.