Changeset 181 in dev for trunk/jenga/src/smoothie/Type.cpp
- Timestamp:
- Jun 24, 2007, 2:05:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jenga/src/smoothie/Type.cpp
r180 r181 1 #include <jenga/include/smoothie/Smoothie.h> 1 2 #include <jenga/include/smoothie/Class.h> 2 3 #include <jenga/include/smoothie/SmoothieException.h> … … 61 62 } 62 63 63 /* 64 64 65 bool Type::StringToType( const string &typeName, Type &type ){ 65 66 type.index = -1; … … 70 71 //関数ポインタ(*Function) 71 72 type.basicType = DEF_PTR_PROC; 72 type.index = AddProcPtrInfo( typeName, cp);73 type.index = Smoothie::GetMeta().GetProcPointers().Add( typeName ); 73 74 return true; 74 75 } … … 93 94 // Object型だったとき 94 95 if( typeName == "Object" ){ 95 type.SetType( DEF_OBJECT, Smoothie:: meta.GetClasses().GetObjectClassPtr() );96 type.SetType( DEF_OBJECT, Smoothie::GetMeta().GetClasses().GetObjectClassPtr() ); 96 97 return true; 97 98 } … … 99 100 // String型だったとき 100 101 if( typeName == "String" ){ 101 type.SetType( DEF_OBJECT, Smoothie:: meta.GetClasses().GetStringClassPtr() );102 type.SetType( DEF_OBJECT, Smoothie::GetMeta().GetClasses().GetStringClassPtr() ); 102 103 return true; 103 104 } … … 107 108 // TypeDefされた型 108 109 //////////////////// 109 int i=Smoothie:: meta.typeDefs.GetIndex( typeName );110 int i=Smoothie::GetMeta().typeDefs.GetIndex( typeName ); 110 111 if(i!=-1){ 111 type = Smoothie:: meta.typeDefs[i].GetBaseType();112 type = Smoothie::GetMeta().typeDefs[i].GetBaseType(); 112 113 return true; 113 114 } 114 115 115 116 //クラス 116 const CClass *pobj_c = Smoothie:: meta.GetClasses().Find( typeName );117 const CClass *pobj_c = Smoothie::GetMeta().GetClasses().Find( typeName ); 117 118 if(pobj_c){ 118 119 type.pClass = pobj_c; … … 128 129 129 130 return false; 130 } */131 } 131 132 132 133 int Type::GetBasicSize( int basicType ) … … 487 488 } 488 489 489 /* 490 490 491 const string Type::ToString() const 491 492 { … … 513 514 } 514 515 else{ 515 if( Smoothie:: meta.procPointers[index]->ReturnType().IsNull() ){516 if( Smoothie::GetMeta().GetProcPointers()[index]->ReturnType().IsNull() ){ 516 517 return "*Sub"; 517 518 } … … 532 533 } 533 534 534 extern int cp; 535 SetError(1,NULL,cp); 535 throw SmoothieException( 1 ); 536 536 537 537 return (string)"(null)"; … … 539 539 540 540 Type Type::String(){ 541 return Type( DEF_OBJECT, *Smoothie:: meta.GetClasses().GetStringClassPtr() );542 } */541 return Type( DEF_OBJECT, *Smoothie::GetMeta().GetClasses().GetStringClassPtr() ); 542 } 543 543 544 544 int Type::GetBasicTypeFromSimpleName( const char *variable ){
Note:
See TracChangeset
for help on using the changeset viewer.