#pragma once class TypeDefCollection; class TypeDef : public Symbol { friend TypeDefCollection; std::string baseName; Type baseType; // XMLシリアライズ用 private: friend class boost::serialization::access; template void serialize(Archive& ar, const unsigned int version) { trace_for_serialize( "serializing - TypeDef" ); ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol ); ar & BOOST_SERIALIZATION_NVP( baseName ); ar & BOOST_SERIALIZATION_NVP( baseType ); } public: TypeDef( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, const Type &baseType ); TypeDef() { } ~TypeDef() { } const std::string &GetBaseName() const { return baseName; } const Type &GetBaseType() const { return baseType; } }; class TypeDefCollection : public std::vector { // XMLシリアライズ用 private: friend class boost::serialization::access; template void serialize(Archive& ar, const unsigned int version) { trace_for_serialize( "serializing - TypeDefCollection" ); ar & boost::serialization::make_nvp("vector_TypeDef", boost::serialization::base_object>(*this)); } public: TypeDefCollection(); ~TypeDefCollection(); void Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine ); const TypeDef *Find( const Symbol &symbol ) const; };