source: dev/trunk/ab5.0/abdev/ab_common/include/Lexical/Member.h@ 639

Last change on this file since 639 was 639, checked in by dai_9181, 16 years ago

静的リンクリンカの依存関係解決モジュールを製作中

File size: 1.8 KB
Line 
1#pragma once
2
3class CClass;
4
5class Member : public MemberPrototype
6{
7 std::string name;
8 Type type;
9 bool isConst;
10 Subscripts subscripts;
11
12 std::string initializeExpression;
13 std::string constructParameter;
14
15 // XMLシリアライズ用
16 // TODO: xml
17private:
18 friend class boost::serialization::access;
19 template<class Archive> void serialize(Archive& ar, const unsigned int version)
20 {
21 trace_for_serialize( "serializing - Member" );
22
23 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( MemberPrototype );
24 ar & BOOST_SERIALIZATION_NVP( name );
25 ar & BOOST_SERIALIZATION_NVP( type );
26 ar & BOOST_SERIALIZATION_NVP( isConst );
27 ar & BOOST_SERIALIZATION_NVP( subscripts );
28 ar & BOOST_SERIALIZATION_NVP( initializeExpression );
29 ar & BOOST_SERIALIZATION_NVP( constructParameter );
30 }
31
32public:
33
34 int source_code_address;
35
36 Member( Prototype::Accessibility accessibility, const std::string &name, const Type &newType, bool isConst, const Subscripts &subscripts, const std::string &initializeExpression, const std::string &constructParameter );
37 Member( const Member &member, const Type &actualType );
38 Member( const Member &member );
39 Member();
40 ~Member();
41
42 const std::string &GetName() const
43 {
44 return name;
45 }
46 void SetName( const std::string &name )
47 {
48 this->name = name;
49 }
50
51 const Type &GetType() const
52 {
53 return type;
54 }
55 void ResetType( const Type &type )
56 {
57 this->type = type;
58 }
59
60 bool IsConst() const
61 {
62 return isConst;
63 }
64
65 const Subscripts &GetSubscripts() const
66 {
67 return subscripts;
68 }
69
70 const std::string &GetInitializeExpression() const
71 {
72 return initializeExpression;
73 }
74 const std::string &GetConstructParameter() const
75 {
76 return constructParameter;
77 }
78
79 virtual bool Resolve( const ObjectModule &resolver );
80};
81typedef std::vector<Member *> Members;
Note: See TracBrowser for help on using the repository browser.