Changeset 181 in dev for trunk/jenga/src/smoothie/Type.cpp


Ignore:
Timestamp:
Jun 24, 2007, 2:05:40 PM (17 years ago)
Author:
dai_9181
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jenga/src/smoothie/Type.cpp

    r180 r181  
     1#include <jenga/include/smoothie/Smoothie.h>
    12#include <jenga/include/smoothie/Class.h>
    23#include <jenga/include/smoothie/SmoothieException.h>
     
    6162}
    6263
    63 /*
     64
    6465bool Type::StringToType( const string &typeName, Type &type ){
    6566    type.index = -1;
     
    7071                //関数ポインタ(*Function)
    7172                type.basicType = DEF_PTR_PROC;
    72                 type.index = AddProcPtrInfo( typeName, cp );
     73                type.index = Smoothie::GetMeta().GetProcPointers().Add( typeName );
    7374                return true;
    7475        }
     
    9394    // Object型だったとき
    9495    if( typeName == "Object" ){
    95         type.SetType( DEF_OBJECT, Smoothie::meta.GetClasses().GetObjectClassPtr() );
     96        type.SetType( DEF_OBJECT, Smoothie::GetMeta().GetClasses().GetObjectClassPtr() );
    9697        return true;
    9798    }
     
    99100    // String型だったとき
    100101    if( typeName == "String" ){
    101         type.SetType( DEF_OBJECT, Smoothie::meta.GetClasses().GetStringClassPtr() );
     102        type.SetType( DEF_OBJECT, Smoothie::GetMeta().GetClasses().GetStringClassPtr() );
    102103        return true;
    103104    }
     
    107108    // TypeDefされた型
    108109    ////////////////////
    109     int i=Smoothie::meta.typeDefs.GetIndex( typeName );
     110    int i=Smoothie::GetMeta().typeDefs.GetIndex( typeName );
    110111    if(i!=-1){
    111         type = Smoothie::meta.typeDefs[i].GetBaseType();
     112        type = Smoothie::GetMeta().typeDefs[i].GetBaseType();
    112113        return true;
    113114    }
    114115
    115116    //クラス
    116     const CClass *pobj_c = Smoothie::meta.GetClasses().Find( typeName );
     117    const CClass *pobj_c = Smoothie::GetMeta().GetClasses().Find( typeName );
    117118    if(pobj_c){
    118119        type.pClass = pobj_c;
     
    128129
    129130    return false;
    130 }*/
     131}
    131132
    132133int Type::GetBasicSize( int basicType )
     
    487488}
    488489
    489 /*
     490
    490491const string Type::ToString() const
    491492{
     
    513514        }
    514515        else{
    515             if( Smoothie::meta.procPointers[index]->ReturnType().IsNull() ){
     516            if( Smoothie::GetMeta().GetProcPointers()[index]->ReturnType().IsNull() ){
    516517                return "*Sub";
    517518            }
     
    532533    }
    533534
    534     extern int cp;
    535     SetError(1,NULL,cp);
     535    throw SmoothieException( 1 );
    536536
    537537    return (string)"(null)";
     
    539539
    540540Type Type::String(){
    541     return Type( DEF_OBJECT, *Smoothie::meta.GetClasses().GetStringClassPtr() );
    542 }*/
     541    return Type( DEF_OBJECT, *Smoothie::GetMeta().GetClasses().GetStringClassPtr() );
     542}
    543543
    544544int Type::GetBasicTypeFromSimpleName( const char *variable ){
Note: See TracChangeset for help on using the changeset viewer.