source: dev/BasicCompiler_Common/include/Member.h@ 138

Last change on this file since 138 was 138, checked in by dai_9181, 17 years ago

Member::initializeExpressionのリファクタリング

File size: 1.1 KB
Line 
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include "Type.h"
7
8using namespace std;
9
10class CClass;
11
12class CMember : public MemberPrototype
13{
14 string name;
15 Type type;
16 bool isConst;
17
18 string initializeExpression;
19 string constructParameter;
20public:
21 int SubScripts[MAX_ARRAYDIM];
22
23 int source_code_address;
24
25 const string &GetName() const
26 {
27 return name;
28 }
29 void SetName( const string &name )
30 {
31 this->name = name;
32 }
33
34 Type GetType() const
35 {
36 return type;
37 }
38
39 bool IsConst()
40 {
41 return isConst;
42 }
43
44 const string &GetInitializeExpression() const
45 {
46 return initializeExpression;
47 }
48 const string &GetConstructParameter() const
49 {
50 return constructParameter;
51 }
52
53 CMember( Prototype::Accessibility accessibility, const string &name, const Type &type, bool isConst )
54 : MemberPrototype( accessibility )
55 , name( name )
56 , type( type )
57 , isConst( isConst )
58 {
59 }
60 CMember( CClass *pobj_c, Prototype::Accessibility accessibility, bool idConst, bool isRef, char *buffer, int nowLine=-1 );
61 CMember( CMember &member );
62 ~CMember();
63 static void InitStaticMember(void);
64};
Note: See TracBrowser for help on using the repository browser.