/// <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 <CppTemplateParameterType>(); Attributes = new CppContainerList <CppAttribute>(this); }
/// <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); Attributes = new CppContainerList <CppAttribute>(this); }
/// <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>(); Attributes = new CppContainerList <CppAttribute>(this); }
/// <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); Attributes = new CppContainerList <CppAttribute>(this); }
/// <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); }