Changeset 78 in dev for BasicCompiler_Common/TypeDef.h


Ignore:
Timestamp:
Mar 25, 2007, 2:47:49 AM (17 years ago)
Author:
dai_9181
Message:

CTypeDef → TypeDef
Houseクラスを追加。
オーバーロードレベルの種類を追加(レベル1に挿入)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/TypeDef.h

    r46 r78  
     1#pragma once
    12
    2 class CTypeDef{
     3#include <vector>
     4#include <string>
     5
     6#include "../Type.h"
     7
     8using namespace std;
     9
     10class TypeDefCollection;
     11
     12class TypeDef{
     13    friend TypeDefCollection;
     14
     15    string newName;
     16    string baseName;
     17    Type baseType;
    318public:
    4     char *lpszName;
    5     char *lpszBaseName;
    6     CTypeDef(const char *name,char *base);
    7     ~CTypeDef();
     19    TypeDef( const string &newName, const string &baseName );
     20    ~TypeDef();
     21
     22    const string &GetNewName(){
     23        return newName;
     24    }
     25    const string &GetBaseName(){
     26        return baseName;
     27    }
     28    const Type &GetBaseType(){
     29        return baseType;
     30    }
    831};
    932
    10 class CDBTypeDef{
     33class TypeDefCollection : public vector<TypeDef>
     34{
    1135public:
    12     CTypeDef **ppobj_TypeDef;
    13     int iNum;
    14     CDBTypeDef();
    15     ~CDBTypeDef();
     36    TypeDefCollection();
     37    ~TypeDefCollection();
    1638
    17     void init();
     39    void Add( const string &newName, const string &baseName );
     40    int GetIndex( const string &typeName ) const;
    1841
    19     void add(const char *name,char *base);
    20     int check(const char *name);
     42private:
     43    void Add( const string &expression, int nowLine );
     44public:
     45    void Init();
    2146};
    22 extern CDBTypeDef *pobj_DBTypeDef;
    23 
    24 
    25 void AddTypeDefData(char *Command);
Note: See TracChangeset for help on using the changeset viewer.