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
RevLine 
[206]1#pragma once
2
3class CClass;
4
[561]5class Member : public MemberPrototype
[206]6{
[523]7 std::string name;
[206]8 Type type;
9 bool isConst;
10 Subscripts subscripts;
11
[523]12 std::string initializeExpression;
13 std::string constructParameter;
[206]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 {
[561]21 trace_for_serialize( "serializing - Member" );
[206]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
[632]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
[523]42 const std::string &GetName() const
[206]43 {
44 return name;
45 }
[523]46 void SetName( const std::string &name )
[206]47 {
48 this->name = name;
49 }
50
[299]51 const Type &GetType() const
[206]52 {
53 return type;
54 }
[299]55 void ResetType( const Type &type )
56 {
57 this->type = type;
58 }
[206]59
[409]60 bool IsConst() const
[206]61 {
62 return isConst;
63 }
64
65 const Subscripts &GetSubscripts() const
66 {
67 return subscripts;
68 }
69
[523]70 const std::string &GetInitializeExpression() const
[206]71 {
72 return initializeExpression;
73 }
[523]74 const std::string &GetConstructParameter() const
[206]75 {
76 return constructParameter;
77 }
[639]78
79 virtual bool Resolve( const ObjectModule &resolver );
[206]80};
[561]81typedef std::vector<Member *> Members;
Note: See TracBrowser for help on using the repository browser.