diff options
Diffstat (limited to 'lib/cppparser/ast.h')
-rw-r--r-- | lib/cppparser/ast.h | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/lib/cppparser/ast.h b/lib/cppparser/ast.h index c53cce20..b6c2d64b 100644 --- a/lib/cppparser/ast.h +++ b/lib/cppparser/ast.h @@ -155,7 +155,7 @@ class CommentAST { class AST : public CommentAST { public: - typedef std::auto_ptr<AST> Node; + typedef std::unique_ptr<AST> Node; enum { Type=NodeType_Generic }; DECLARE_ALLOC( AST ) @@ -217,7 +217,7 @@ private: class GroupAST: public AST { public: - typedef std::auto_ptr<GroupAST> Node; + typedef std::unique_ptr<GroupAST> Node; enum { Type = NodeType_Group }; DECLARE_ALLOC( GroupAST ) @@ -242,7 +242,7 @@ private: class TemplateArgumentListAST: public AST { public: - typedef std::auto_ptr<TemplateArgumentListAST> Node; + typedef std::unique_ptr<TemplateArgumentListAST> Node; enum { Type = NodeType_TemplateArgumentList }; DECLARE_ALLOC( TemplateArgumentListAST ) @@ -266,7 +266,7 @@ private: class ClassOrNamespaceNameAST: public AST { public: - typedef std::auto_ptr<ClassOrNamespaceNameAST> Node; + typedef std::unique_ptr<ClassOrNamespaceNameAST> Node; enum { Type = NodeType_ClassOrNamespaceName }; DECLARE_ALLOC( ClassOrNamespaceNameAST ) @@ -294,7 +294,7 @@ private: class NameAST: public AST { public: - typedef std::auto_ptr<NameAST> Node; + typedef std::unique_ptr<NameAST> Node; enum { Type = NodeType_Name }; DECLARE_ALLOC( NameAST ) @@ -326,7 +326,7 @@ private: class TypeParameterAST: public AST { public: - typedef std::auto_ptr<TypeParameterAST> Node; + typedef std::unique_ptr<TypeParameterAST> Node; enum { Type = NodeType_TypeParameter }; DECLARE_ALLOC( TypeParameterAST ) @@ -338,7 +338,7 @@ public: void setKind( AST::Node& kind ); class TemplateParameterListAST* templateParameterList() { return m_templateParameterList.get(); } - void setTemplateParameterList( std::auto_ptr<class TemplateParameterListAST>& templateParameterList ); + void setTemplateParameterList( std::unique_ptr<class TemplateParameterListAST>& templateParameterList ); NameAST* name() { return m_name.get(); } void setName( NameAST::Node& name ); @@ -348,7 +348,7 @@ public: private: AST::Node m_kind; - std::auto_ptr<class TemplateParameterListAST> m_templateParameterList; + std::unique_ptr<class TemplateParameterListAST> m_templateParameterList; NameAST::Node m_name; AST::Node m_typeId; @@ -360,7 +360,7 @@ private: class DeclarationAST: public AST { public: - typedef std::auto_ptr<DeclarationAST> Node; + typedef std::unique_ptr<DeclarationAST> Node; enum { Type = NodeType_Declaration }; DECLARE_ALLOC( DeclarationAST ) @@ -376,7 +376,7 @@ private: class AccessDeclarationAST: public DeclarationAST { public: - typedef std::auto_ptr<AccessDeclarationAST> Node; + typedef std::unique_ptr<AccessDeclarationAST> Node; enum { Type = NodeType_AccessDeclaration }; DECLARE_ALLOC( AccessDeclarationAST ) @@ -400,7 +400,7 @@ private: class TypeSpecifierAST: public AST { public: - typedef std::auto_ptr<TypeSpecifierAST> Node; + typedef std::unique_ptr<TypeSpecifierAST> Node; enum { Type = NodeType_TypeSpecifier }; DECLARE_ALLOC( TypeSpecifierAST ) @@ -432,7 +432,7 @@ private: class BaseSpecifierAST: public AST { public: - typedef std::auto_ptr<BaseSpecifierAST> Node; + typedef std::unique_ptr<BaseSpecifierAST> Node; enum { Type = NodeType_BaseSpecifier }; DECLARE_ALLOC( BaseSpecifierAST ) @@ -462,7 +462,7 @@ private: class BaseClauseAST: public AST { public: - typedef std::auto_ptr<BaseClauseAST> Node; + typedef std::unique_ptr<BaseClauseAST> Node; enum { Type = NodeType_BaseClause }; DECLARE_ALLOC( BaseClauseAST ) @@ -484,7 +484,7 @@ private: class ClassSpecifierAST: public TypeSpecifierAST { public: - typedef std::auto_ptr<ClassSpecifierAST> Node; + typedef std::unique_ptr<ClassSpecifierAST> Node; enum { Type = NodeType_ClassSpecifier }; DECLARE_ALLOC( ClassSpecifierAST ) @@ -517,7 +517,7 @@ private: class EnumeratorAST: public AST { public: - typedef std::auto_ptr<EnumeratorAST> Node; + typedef std::unique_ptr<EnumeratorAST> Node; enum { Type = NodeType_Enumerator }; DECLARE_ALLOC( EnumeratorAST ) @@ -543,7 +543,7 @@ private: class EnumSpecifierAST: public TypeSpecifierAST { public: - typedef std::auto_ptr<EnumSpecifierAST> Node; + typedef std::unique_ptr<EnumSpecifierAST> Node; enum { Type = NodeType_EnumSpecifier }; DECLARE_ALLOC( EnumSpecifierAST ) @@ -565,7 +565,7 @@ private: class ElaboratedTypeSpecifierAST: public TypeSpecifierAST { public: - typedef std::auto_ptr<ElaboratedTypeSpecifierAST> Node; + typedef std::unique_ptr<ElaboratedTypeSpecifierAST> Node; enum { Type = NodeType_ElaboratedTypeSpecifier }; DECLARE_ALLOC( ElaboratedTypeSpecifierAST ) @@ -590,7 +590,7 @@ private: class LinkageBodyAST: public AST { public: - typedef std::auto_ptr<LinkageBodyAST> Node; + typedef std::unique_ptr<LinkageBodyAST> Node; enum { Type = NodeType_LinkageBody }; DECLARE_ALLOC( LinkageBodyAST ) @@ -612,7 +612,7 @@ private: class LinkageSpecificationAST: public DeclarationAST { public: - typedef std::auto_ptr<LinkageSpecificationAST> Node; + typedef std::unique_ptr<LinkageSpecificationAST> Node; enum { Type = NodeType_LinkageSpecification }; DECLARE_ALLOC( LinkageSpecificationAST ) @@ -642,7 +642,7 @@ private: class NamespaceAST: public DeclarationAST { public: - typedef std::auto_ptr<NamespaceAST> Node; + typedef std::unique_ptr<NamespaceAST> Node; enum { Type = NodeType_Namespace }; DECLARE_ALLOC( NamespaceAST ) @@ -668,7 +668,7 @@ private: class NamespaceAliasAST: public DeclarationAST { public: - typedef std::auto_ptr<NamespaceAliasAST> Node; + typedef std::unique_ptr<NamespaceAliasAST> Node; enum { Type = NodeType_NamespaceAlias }; DECLARE_ALLOC( NamespaceAliasAST ) @@ -694,7 +694,7 @@ private: class UsingAST: public DeclarationAST { public: - typedef std::auto_ptr<UsingAST> Node; + typedef std::unique_ptr<UsingAST> Node; enum { Type = NodeType_Using }; DECLARE_ALLOC( UsingAST ) @@ -720,7 +720,7 @@ private: class UsingDirectiveAST: public DeclarationAST { public: - typedef std::auto_ptr<UsingDirectiveAST> Node; + typedef std::unique_ptr<UsingDirectiveAST> Node; enum { Type = NodeType_UsingDirective }; DECLARE_ALLOC( UsingDirectiveAST ) @@ -742,7 +742,7 @@ private: class DeclaratorAST: public AST { public: - typedef std::auto_ptr<DeclaratorAST> Node; + typedef std::unique_ptr<DeclaratorAST> Node; enum { Type = NodeType_Declarator }; DECLARE_ALLOC( DeclaratorAST ) @@ -754,7 +754,7 @@ public: void addPtrOp( AST::Node& ptrOp ); DeclaratorAST* subDeclarator() { return m_subDeclarator.get(); } - void setSubDeclarator( std::auto_ptr<DeclaratorAST>& subDeclarator ); + void setSubDeclarator( Node& subDeclarator ); NameAST* declaratorId() { return m_declaratorId.get(); } void setDeclaratorId( NameAST::Node& declaratorId ); @@ -766,7 +766,7 @@ public: void addArrayDimension( AST::Node& arrayDimension ); class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); } - void setParameterDeclarationClause( std::auto_ptr<class ParameterDeclarationClauseAST>& parameterDeclarationClause ); + void setParameterDeclarationClause( std::unique_ptr<class ParameterDeclarationClauseAST>& parameterDeclarationClause ); // ### replace 'constant' with cvQualify AST* constant() { return m_constant.get(); } @@ -777,11 +777,11 @@ public: private: TQPtrList<AST> m_ptrOpList; - std::auto_ptr<DeclaratorAST> m_subDeclarator; + Node m_subDeclarator; NameAST::Node m_declaratorId; AST::Node m_bitfieldInitialization; TQPtrList<AST> m_arrayDimensionList; - std::auto_ptr<class ParameterDeclarationClauseAST> m_parameterDeclarationClause; + std::unique_ptr<class ParameterDeclarationClauseAST> m_parameterDeclarationClause; AST::Node m_constant; GroupAST::Node m_exceptionSpecification; @@ -793,7 +793,7 @@ private: class ParameterDeclarationAST: public AST { public: - typedef std::auto_ptr<ParameterDeclarationAST> Node; + typedef std::unique_ptr<ParameterDeclarationAST> Node; enum { Type = NodeType_ParameterDeclaration }; DECLARE_ALLOC( ParameterDeclarationAST ) @@ -825,7 +825,7 @@ private: class ParameterDeclarationListAST: public AST { public: - typedef std::auto_ptr<ParameterDeclarationListAST> Node; + typedef std::unique_ptr<ParameterDeclarationListAST> Node; enum { Type = NodeType_ParameterDeclarationList }; DECLARE_ALLOC( ParameterDeclarationListAST ) @@ -849,7 +849,7 @@ private: class ParameterDeclarationClauseAST: public AST { public: - typedef std::auto_ptr<ParameterDeclarationClauseAST> Node; + typedef std::unique_ptr<ParameterDeclarationClauseAST> Node; enum { Type = NodeType_ParameterDeclarationClause }; DECLARE_ALLOC( ParameterDeclarationClauseAST ) @@ -878,7 +878,7 @@ private: class InitDeclaratorAST: public AST { public: - typedef std::auto_ptr<InitDeclaratorAST> Node; + typedef std::unique_ptr<InitDeclaratorAST> Node; enum { Type = NodeType_InitDeclarator }; DECLARE_ALLOC( InitDeclaratorAST ) @@ -904,7 +904,7 @@ private: class InitDeclaratorListAST: public AST { public: - typedef std::auto_ptr<InitDeclaratorListAST> Node; + typedef std::unique_ptr<InitDeclaratorListAST> Node; enum { Type = NodeType_InitDeclaratorList }; DECLARE_ALLOC( InitDeclaratorListAST ) @@ -926,7 +926,7 @@ private: class TypedefAST: public DeclarationAST { public: - typedef std::auto_ptr<TypedefAST> Node; + typedef std::unique_ptr<TypedefAST> Node; enum { Type = NodeType_Typedef }; DECLARE_ALLOC( TypedefAST ) @@ -952,7 +952,7 @@ private: class TemplateParameterAST: public AST { public: - typedef std::auto_ptr<TemplateParameterAST> Node; + typedef std::unique_ptr<TemplateParameterAST> Node; enum { Type = NodeType_TemplateParameter }; DECLARE_ALLOC( TemplateParameterAST ) @@ -978,7 +978,7 @@ private: class TemplateParameterListAST: public AST { public: - typedef std::auto_ptr<TemplateParameterListAST> Node; + typedef std::unique_ptr<TemplateParameterListAST> Node; enum { Type = NodeType_TemplateParameterList }; DECLARE_ALLOC( TemplateParameterListAST ) @@ -1000,7 +1000,7 @@ private: class TemplateDeclarationAST: public DeclarationAST { public: - typedef std::auto_ptr<TemplateDeclarationAST> Node; + typedef std::unique_ptr<TemplateDeclarationAST> Node; enum { Type = NodeType_TemplateDeclaration }; DECLARE_ALLOC( TemplateDeclarationAST ) @@ -1030,7 +1030,7 @@ private: class SimpleDeclarationAST: public DeclarationAST { public: - typedef std::auto_ptr<SimpleDeclarationAST> Node; + typedef std::unique_ptr<SimpleDeclarationAST> Node; enum { Type = NodeType_SimpleDeclaration }; DECLARE_ALLOC( SimpleDeclarationAST ) @@ -1068,7 +1068,7 @@ private: class StatementAST: public AST { public: - typedef std::auto_ptr<StatementAST> Node; + typedef std::unique_ptr<StatementAST> Node; enum { Type = NodeType_Statement }; DECLARE_ALLOC( StatementAST ) @@ -1084,7 +1084,7 @@ private: class ExpressionStatementAST: public StatementAST { public: - typedef std::auto_ptr<ExpressionStatementAST> Node; + typedef std::unique_ptr<ExpressionStatementAST> Node; enum { Type = NodeType_ExpressionStatement }; DECLARE_ALLOC( ExpressionStatementAST ) @@ -1106,7 +1106,7 @@ private: class ConditionAST: public AST { public: - typedef std::auto_ptr<ConditionAST> Node; + typedef std::unique_ptr<ConditionAST> Node; enum { Type = NodeType_Condition }; DECLARE_ALLOC( ConditionAST ) @@ -1136,7 +1136,7 @@ private: class IfStatementAST: public StatementAST { public: - typedef std::auto_ptr<IfStatementAST> Node; + typedef std::unique_ptr<IfStatementAST> Node; enum { Type = NodeType_IfStatement }; DECLARE_ALLOC( IfStatementAST ) @@ -1166,7 +1166,7 @@ private: class WhileStatementAST: public StatementAST { public: - typedef std::auto_ptr<WhileStatementAST> Node; + typedef std::unique_ptr<WhileStatementAST> Node; enum { Type = NodeType_WhileStatement }; DECLARE_ALLOC( WhileStatementAST ) @@ -1192,7 +1192,7 @@ private: class DoStatementAST: public StatementAST { public: - typedef std::auto_ptr<DoStatementAST> Node; + typedef std::unique_ptr<DoStatementAST> Node; enum { Type = NodeType_DoStatement }; DECLARE_ALLOC( DoStatementAST ) @@ -1218,7 +1218,7 @@ private: class ForStatementAST: public StatementAST { public: - typedef std::auto_ptr<ForStatementAST> Node; + typedef std::unique_ptr<ForStatementAST> Node; enum { Type = NodeType_ForStatement }; DECLARE_ALLOC( ForStatementAST ) @@ -1252,7 +1252,7 @@ private: class ForEachStatementAST: public StatementAST { public: - typedef std::auto_ptr<ForEachStatementAST> Node; + typedef std::unique_ptr<ForEachStatementAST> Node; enum { Type = NodeType_ForEachStatement }; DECLARE_ALLOC( ForEachStatementAST ) @@ -1282,7 +1282,7 @@ private: class SwitchStatementAST: public StatementAST { public: - typedef std::auto_ptr<SwitchStatementAST> Node; + typedef std::unique_ptr<SwitchStatementAST> Node; enum { Type = NodeType_SwitchStatement }; DECLARE_ALLOC( SwitchStatementAST ) @@ -1308,7 +1308,7 @@ private: class StatementListAST: public StatementAST { public: - typedef std::auto_ptr<StatementListAST> Node; + typedef std::unique_ptr<StatementListAST> Node; enum { Type = NodeType_StatementList }; DECLARE_ALLOC( StatementListAST ) @@ -1330,7 +1330,7 @@ private: class CatchStatementAST: public StatementAST { public: - typedef std::auto_ptr<CatchStatementAST> Node; + typedef std::unique_ptr<CatchStatementAST> Node; enum { Type = NodeType_CatchStatement }; DECLARE_ALLOC( CatchStatementAST ) @@ -1356,7 +1356,7 @@ private: class CatchStatementListAST: public StatementAST { public: - typedef std::auto_ptr<CatchStatementListAST> Node; + typedef std::unique_ptr<CatchStatementListAST> Node; enum { Type = NodeType_CatchStatementList }; DECLARE_ALLOC( CatchStatementListAST ) @@ -1378,7 +1378,7 @@ private: class TryBlockStatementAST: public StatementAST { public: - typedef std::auto_ptr<TryBlockStatementAST> Node; + typedef std::unique_ptr<TryBlockStatementAST> Node; enum { Type = NodeType_TryBlockStatement }; DECLARE_ALLOC( TryBlockStatementAST ) @@ -1404,7 +1404,7 @@ private: class DeclarationStatementAST: public StatementAST { public: - typedef std::auto_ptr<DeclarationStatementAST> Node; + typedef std::unique_ptr<DeclarationStatementAST> Node; enum { Type = NodeType_DeclarationStatement }; DECLARE_ALLOC( DeclarationStatementAST ) @@ -1426,7 +1426,7 @@ private: class FunctionDefinitionAST: public DeclarationAST { public: - typedef std::auto_ptr<FunctionDefinitionAST> Node; + typedef std::unique_ptr<FunctionDefinitionAST> Node; enum { Type = NodeType_FunctionDefinition }; DECLARE_ALLOC( FunctionDefinitionAST ) |