source: dev/trunk/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h@ 603

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

ObjectModuleに関連するクラス一式をab_commonプロジェクトに移動した。

File size: 1.4 KB
Line 
1#pragma once
2
3class TypeDefCollection;
4
5class TypeDef : public Symbol
6{
7 friend TypeDefCollection;
8
9 std::string baseName;
10 Type baseType;
11
12 // XMLシリアライズ用
13private:
14 friend class boost::serialization::access;
15 template<class Archive> void serialize(Archive& ar, const unsigned int version)
16 {
17 trace_for_serialize( "serializing - TypeDef" );
18
19 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
20 ar & BOOST_SERIALIZATION_NVP( baseName );
21 ar & BOOST_SERIALIZATION_NVP( baseType );
22 }
23
24public:
25 TypeDef( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, const Type &baseType );
26 TypeDef()
27 {
28 }
29 ~TypeDef()
30 {
31 }
32
33 const std::string &GetBaseName() const
34 {
35 return baseName;
36 }
37 const Type &GetBaseType() const
38 {
39 return baseType;
40 }
41};
42
43class TypeDefCollection : public std::vector<TypeDef>
44{
45 // XMLシリアライズ用
46private:
47 friend class boost::serialization::access;
48 template<class Archive> void serialize(Archive& ar, const unsigned int version)
49 {
50 trace_for_serialize( "serializing - TypeDefCollection" );
51
52 ar & boost::serialization::make_nvp("vector_TypeDef",
53 boost::serialization::base_object<std::vector<TypeDef>>(*this));
54 }
55
56public:
57 TypeDefCollection();
58 ~TypeDefCollection();
59
60 void Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine );
61 int GetIndex( const Symbol &symbol ) const;
62};
Note: See TracBrowser for help on using the repository browser.