diff --git a/src/AST/Declaration.cs b/src/AST/Declaration.cs index 5c623bf1..00eb00c8 100644 --- a/src/AST/Declaration.cs +++ b/src/AST/Declaration.cs @@ -365,40 +365,6 @@ namespace CppSharp.AST public abstract T Visit(IDeclVisitor visitor); } - /// - /// Base class for declarations which introduce a typedef-name. - /// - public abstract class TypedefNameDecl : Declaration, ITypedDecl - { - public Type Type { get { return QualifiedType.Type; } } - public QualifiedType QualifiedType { get; set; } - public bool IsSynthetized { get; set; } - } - - /// - /// Represents a type definition in C++. - /// - public class TypedefDecl : TypedefNameDecl - { - public override T Visit(IDeclVisitor visitor) - { - return visitor.VisitTypedefDecl(this); - } - } - - /// - /// Represents a type alias in C++. - /// - public class TypeAlias : TypedefNameDecl - { - public TypeAliasTemplate DescribedAliasTemplate { get; set; } - - public override T Visit(IDeclVisitor visitor) - { - return visitor.VisitTypeAliasDecl(this); - } - } - public interface IDeclVisitor { T VisitDeclaration(Declaration decl); diff --git a/src/AST/Typedef.cs b/src/AST/Typedef.cs new file mode 100644 index 00000000..f0f270b9 --- /dev/null +++ b/src/AST/Typedef.cs @@ -0,0 +1,36 @@ +namespace CppSharp.AST +{ + /// + /// Base class for declarations which introduce a typedef-name. + /// + public abstract class TypedefNameDecl : Declaration, ITypedDecl + { + public Type Type { get { return QualifiedType.Type; } } + public QualifiedType QualifiedType { get; set; } + public bool IsSynthetized { get; set; } + } + + /// + /// Represents a type definition in C++. + /// + public class TypedefDecl : TypedefNameDecl + { + public override T Visit(IDeclVisitor visitor) + { + return visitor.VisitTypedefDecl(this); + } + } + + /// + /// Represents a type alias in C++. + /// + public class TypeAlias : TypedefNameDecl + { + public TypeAliasTemplate DescribedAliasTemplate { get; set; } + + public override T Visit(IDeclVisitor visitor) + { + return visitor.VisitTypeAliasDecl(this); + } + } +} \ No newline at end of file