Rev | Line | |
---|
[193] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | class TypeDefCollection;
|
---|
| 4 |
|
---|
[206] | 5 | class TypeDef : public Symbol
|
---|
| 6 | {
|
---|
[193] | 7 | friend TypeDefCollection;
|
---|
| 8 |
|
---|
[523] | 9 | std::string baseName;
|
---|
[193] | 10 | Type baseType;
|
---|
[206] | 11 |
|
---|
| 12 | // XMLシリアライズ用
|
---|
| 13 | private:
|
---|
| 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 |
|
---|
[193] | 24 | public:
|
---|
[542] | 25 | TypeDef( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, const Type &baseType );
|
---|
[206] | 26 | TypeDef()
|
---|
[193] | 27 | {
|
---|
| 28 | }
|
---|
[206] | 29 | ~TypeDef()
|
---|
| 30 | {
|
---|
| 31 | }
|
---|
| 32 |
|
---|
[523] | 33 | const std::string &GetBaseName() const
|
---|
[193] | 34 | {
|
---|
| 35 | return baseName;
|
---|
| 36 | }
|
---|
| 37 | const Type &GetBaseType() const
|
---|
| 38 | {
|
---|
| 39 | return baseType;
|
---|
| 40 | }
|
---|
| 41 | };
|
---|
| 42 |
|
---|
[206] | 43 | class TypeDefCollection : public std::vector<TypeDef>
|
---|
[193] | 44 | {
|
---|
[206] | 45 | // XMLシリアライズ用
|
---|
| 46 | private:
|
---|
| 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 |
|
---|
[193] | 56 | public:
|
---|
| 57 | TypeDefCollection();
|
---|
| 58 | ~TypeDefCollection();
|
---|
| 59 |
|
---|
[523] | 60 | void Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine );
|
---|
[598] | 61 | int GetIndex( const Symbol &symbol ) const;
|
---|
[193] | 62 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.