source: dev/trunk/jenga/include/smoothie/Member.h@ 180

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

Meta::GetClassesメソッドを追加

File size: 1.4 KB
Line 
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include "Type.h"
7#include "Class.h"
8#include "Source.h"
9
10using namespace std;
11
12class CClass;
13
14class CMember : public MemberPrototype
15{
16 string name;
17 Type type;
18 bool isConst;
19
20 string initializeExpression;
21 string constructParameter;
22public:
23 int SubScripts[MAX_ARRAYDIM];
24
25 int source_code_address;
26
27 const string &GetName() const
28 {
29 return name;
30 }
31 void SetName( const string &name )
32 {
33 this->name = name;
34 }
35
36 Type GetType() const
37 {
38 return type;
39 }
40
41 bool IsConst()
42 {
43 return isConst;
44 }
45
46 const string &GetInitializeExpression() const
47 {
48 return initializeExpression;
49 }
50 const string &GetConstructParameter() const
51 {
52 return constructParameter;
53 }
54
55 CMember( Prototype::Accessibility accessibility, const string &name, const Type &type, bool isConst )
56 : MemberPrototype( accessibility )
57 , name( name )
58 , type( type )
59 , isConst( isConst )
60 {
61 }
62 CMember::CMember(CMember &member)
63 : MemberPrototype( member.GetAccessibility() )
64 , name( member.GetName() )
65 , type( member.GetType() )
66 , isConst( member.IsConst() )
67 {
68 //SubScripts
69 memcpy(SubScripts,member.SubScripts,MAX_ARRAYDIM*sizeof(int));
70
71 //ソースコードの位置
72 source_code_address=member.source_code_address;
73 }
74 ~CMember()
75 {
76 }
77};
78typedef std::vector<CMember *> Members;
Note: See TracBrowser for help on using the repository browser.