Changeset 192 in dev for trunk/jenga/src/smoothie/Class.cpp
- Timestamp:
- Jun 26, 2007, 5:04:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jenga/src/smoothie/Class.cpp
r190 r192 374 374 } 375 375 376 const CClass *Classes::Find( const NamespaceScopes &namespaceScopes, const string &name ) const377 {378 int key;379 key=GetHashCode(name.c_str());380 381 if( namespaceScopes.size() == 0 && name == "Object" ){382 return GetObjectClassPtr();383 }384 else if( namespaceScopes.size() == 0 && name == "String" ){385 return GetStringClassPtr();386 }387 388 if(pobj_ClassHash[key]){389 CClass *pobj_c;390 pobj_c=pobj_ClassHash[key];391 while(1){392 if( pobj_c->IsEqualSymbol( namespaceScopes, name ) ){393 //名前空間とクラス名が一致した394 return pobj_c;395 }396 397 if(pobj_c->pobj_NextClass==0) break;398 pobj_c=pobj_c->pobj_NextClass;399 }400 }401 402 // TypeDefも見る403 int index = Smoothie::GetMeta().typeDefs.GetIndex( namespaceScopes, name );404 if( index != -1 ){405 Type type = Smoothie::GetMeta().typeDefs[index].GetBaseType();406 if( type.IsObject() ){407 return &type.GetClass();408 }409 }410 411 return NULL;412 }413 376 const CClass *Classes::Find( const string &fullName ) const 414 377 {
Note:
See TracChangeset
for help on using the changeset viewer.