Changeset 87 in dev for BasicCompiler_Common


Ignore:
Timestamp:
Apr 1, 2007, 2:28:03 AM (18 years ago)
Author:
dai_9181
Message:

House::Metaを追加。
Source.h/Source.cppを追加(実装はこれから)。

Location:
BasicCompiler_Common
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Class.cpp

    r85 r87  
    14241424}
    14251425
     1426void CDBClass::GenerateRuntimeTypeInfo(){
     1427}
     1428
     1429
     1430
    14261431CClass *CDBClass::GetStringClass() const
    14271432{
  • BasicCompiler_Common/Class.h

    r78 r87  
    217217    void GetClass_recur(const char *lpszInheritsClass);
    218218    void GetAllClassInfo(void);
     219    void GenerateRuntimeTypeInfo();
    219220
    220221
  • BasicCompiler_Common/DebugMiddleFile.cpp

    r79 r87  
    138138    // TypeDef情報
    139139    //////////////////
    140     *(long *)(buffer+i2)=(int)House::typeDefs.size();
    141     i2+=sizeof(long);
    142     for(i3=0;i3<(int)House::typeDefs.size();i3++){
    143         lstrcpy(buffer+i2,House::typeDefs[i3].GetNewName().c_str() );
    144         i2+=lstrlen(buffer+i2)+1;
    145 
    146         lstrcpy(buffer+i2,House::typeDefs[i3].GetBaseName().c_str() );
     140    *(long *)(buffer+i2)=(int)House::Meta::typeDefs.size();
     141    i2+=sizeof(long);
     142    for(i3=0;i3<(int)House::Meta::typeDefs.size();i3++){
     143        lstrcpy(buffer+i2,House::Meta::typeDefs[i3].GetNewName().c_str() );
     144        i2+=lstrlen(buffer+i2)+1;
     145
     146        lstrcpy(buffer+i2,House::Meta::typeDefs[i3].GetBaseName().c_str() );
    147147        i2+=lstrlen(buffer+i2)+1;
    148148
     
    505505
    506506    //初期化
    507     House::typeDefs.clear();
     507    House::Meta::typeDefs.clear();
    508508
    509509    //個数を取得
     
    514514        i2+=lstrlen(buffer+i2)+1;
    515515
    516         House::typeDefs.push_back( TypeDef( temp5, buffer+i2 ) );
     516        House::Meta::typeDefs.push_back( TypeDef( temp5, buffer+i2 ) );
    517517
    518518        i2+=lstrlen(buffer+i2)+1;
  • BasicCompiler_Common/Subroutine.cpp

    r79 r87  
    180180        GetVarType(fullCallName,type,false);
    181181
    182         ProcPointer *pProcPtr = House::procPointers[type.GetIndex()];
     182        ProcPointer *pProcPtr = House::Meta::procPointers[type.GetIndex()];
    183183        resultType = pProcPtr->ReturnType();
    184184
     
    781781    pProcPointer->SetParamsAndReturnType( paramStr.c_str(), nowLine );
    782782
    783     House::procPointers.push_back( pProcPointer );
    784 
    785     return (int)House::procPointers.size()-1;
     783    House::Meta::procPointers.push_back( pProcPointer );
     784
     785    return (int)House::Meta::procPointers.size()-1;
    786786}
    787787void DeleteProcPtrInfo(void){
    788     BOOST_FOREACH( ProcPointer *pProcPointer, House::procPointers ){
     788    BOOST_FOREACH( ProcPointer *pProcPointer, House::Meta::procPointers ){
    789789        delete pProcPointer;
    790790    }
    791791
    792     House::procPointers.clear();
    793 }
     792    House::Meta::procPointers.clear();
     793}
  • BasicCompiler_Common/Type.cpp

    r78 r87  
    8989    // TypeDefされた型
    9090    ////////////////////
    91     int i=House::typeDefs.GetIndex( typeName.c_str() );
     91    int i=House::Meta::typeDefs.GetIndex( typeName.c_str() );
    9292    if(i!=-1){
    93         type = House::typeDefs[i].GetBaseType();
     93        type = House::Meta::typeDefs[i].GetBaseType();
    9494        return true;
    9595    }
     
    463463        }
    464464        else{
    465             if( House::procPointers[index]->ReturnType().IsNull() ){
     465            if( House::Meta::procPointers[index]->ReturnType().IsNull() ){
    466466                return "*Sub";
    467467            }
  • BasicCompiler_Common/TypeDef.cpp

    r79 r87  
    126126    cp = nowLine;
    127127
    128     House::typeDefs.Add(temporary,pTemp);
     128    House::Meta::typeDefs.Add(temporary,pTemp);
    129129}
    130130
     
    164164                    if(basbuf[i]=='\0') break;
    165165                }
    166                 House::typeDefs.Add(temporary,"Long");
     166                House::Meta::typeDefs.Add(temporary,"Long");
    167167            }
    168168        }
  • BasicCompiler_Common/VariableOpe.cpp

    r79 r87  
    220220        if(lpIndex==-1) lstrcpy(name,"VoidPtr");
    221221        else{
    222             if( House::procPointers[lpIndex]->ReturnType().IsNull() )
     222            if( House::Meta::procPointers[lpIndex]->ReturnType().IsNull() )
    223223                lstrcpy(name,"*Sub");
    224224            else lstrcpy(name,"*Function");
  • BasicCompiler_Common/include/House.h

    r78 r87  
    11#pragma once
    22
     3#include "Source.h"
    34#include "../TypeDef.h"
    45
    56class House{
    67public:
    7     // TypeDef
    8     static TypeDefCollection typeDefs;
    9     static vector<ProcPointer *> procPointers;
     8
     9    class Lexical{
     10    public:
     11        static BasicSource source;
     12    };
     13
     14    class Meta{
     15    public:
     16        // TypeDef
     17        static TypeDefCollection typeDefs;
     18        static vector<ProcPointer *> procPointers;
     19    };
    1020};
  • BasicCompiler_Common/src/House.cpp

    r78 r87  
    11#include <..\common.h>
    22
    3 TypeDefCollection House::typeDefs;
    4 vector<ProcPointer *> House::procPointers;
     3TypeDefCollection House::Meta::typeDefs;
     4vector<ProcPointer *> House::Meta::procPointers;
Note: See TracChangeset for help on using the changeset viewer.