Exemplo n.º 1
0
 /// <summary>
 /// Creates a new instance of a function/method with the specified name.
 /// </summary>
 /// <param name="name">Name of this function/method.</param>
 public CppFunction(string name)
 {
     Name               = name;
     Parameters         = new CppContainerList <CppParameter>(this);
     TemplateParameters = new List <CppType>();
     Attributes         = new CppContainerList <CppAttribute>(this);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a namespace with the specified name.
 /// </summary>
 /// <param name="name">Name of the namespace.</param>
 public CppNamespace(string name)
 {
     Name       = name ?? throw new ArgumentNullException(nameof(name));
     Fields     = new CppContainerList <CppField>(this);
     Functions  = new CppContainerList <CppFunction>(this);
     Enums      = new CppContainerList <CppEnum>(this);
     Classes    = new CppContainerList <CppClass>(this);
     Typedefs   = new CppContainerList <CppTypedef>(this);
     Namespaces = new CppContainerList <CppNamespace>(this);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new instance of this container.
 /// </summary>
 public CppGlobalDeclarationContainer()
 {
     Macros     = new List <CppMacro>();
     Fields     = new CppContainerList <CppField>(this);
     Functions  = new CppContainerList <CppFunction>(this);
     Enums      = new CppContainerList <CppEnum>(this);
     Classes    = new CppContainerList <CppClass>(this);
     Typedefs   = new CppContainerList <CppTypedef>(this);
     Namespaces = new CppContainerList <CppNamespace>(this);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new instance of this container.
 /// </summary>
 public CppGlobalDeclarationContainer()
 {
     _multiCacheByName = new Dictionary <ICppContainer, Dictionary <string, CacheByName> >(ReferenceEqualityComparer <ICppContainer> .Default);
     Macros            = new List <CppMacro>();
     Fields            = new CppContainerList <CppField>(this);
     Functions         = new CppContainerList <CppFunction>(this);
     Enums             = new CppContainerList <CppEnum>(this);
     Classes           = new CppContainerList <CppClass>(this);
     Typedefs          = new CppContainerList <CppTypedef>(this);
     Namespaces        = new CppContainerList <CppNamespace>(this);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="name">Name of this type.</param>
 public CppClass(string name) : base(CppTypeKind.StructOrClass)
 {
     Name               = name ?? throw new ArgumentNullException(nameof(name));
     BaseTypes          = new List <CppBaseType>();
     Fields             = new CppContainerList <CppField>(this);
     Constructors       = new CppContainerList <CppFunction>(this);
     Functions          = new CppContainerList <CppFunction>(this);
     Enums              = new CppContainerList <CppEnum>(this);
     Classes            = new CppContainerList <CppClass>(this);
     Typedefs           = new CppContainerList <CppTypedef>(this);
     TemplateParameters = new List <CppTemplateParameterType>();
 }
Exemplo n.º 6
0
 /// <summary>
 /// Constructor of a function type.
 /// </summary>
 /// <param name="returnType">Return type of this function type.</param>
 public CppFunctionType(CppType returnType) : base(CppTypeKind.Function)
 {
     ReturnType = returnType ?? throw new ArgumentNullException(nameof(returnType));
     Parameters = new CppContainerList <CppParameter>(this);
 }
Exemplo n.º 7
0
 /// <summary>
 /// Creates a new instance of this enum.
 /// </summary>
 /// <param name="name">Name of this enum</param>
 public CppEnum(string name) : base(CppTypeKind.Enum)
 {
     Name  = name;
     Items = new CppContainerList <CppEnumItem>(this);
 }