CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
attribute.h
1
3#ifndef _system_attribute_h_
4#define _system_attribute_h_
5
6#include "system/object.h"
7#include "system/array.h"
8
9namespace System
10{
15 class ASPOSECPP_SHARED_CLASS Attribute : public System::Object
16 {
17 RTTI_INFO(System::Attribute, ::System::BaseTypesInfo<System::Object>)
18
19 public:
24 static Object::ptr GetCustomAttribute(const TypeInfo& type, const TypeInfo& attributeType)
25 {
26 return type.GetCustomAttribute(attributeType);
27 }
28
33 {
34 return type.GetCustomAttributes();
35 }
36 };
37
39 // flags.
40 class ASPOSECPP_SHARED_CLASS FlagsAttribute : public Attribute
41 {
42 RTTI_INFO(System::FlagsAttribute, ::System::BaseTypesInfo<System::Attribute>)
43 };
44}
45
46#endif // _Attribute_h_
A base class for custom attributes. Objects of this class should only be allocated using System::Make...
Definition: attribute.h:16
static Object::ptr GetCustomAttribute(const TypeInfo &type, const TypeInfo &attributeType)
Returns a custom attribute of a specified type appllied to specified type.
Definition: attribute.h:24
static ArrayPtr< Object::ptr > GetCustomAttributes(const TypeInfo &type)
Returns all custom attributes appllied to specified type.
Definition: attribute.h:32
Indicates that an enumeration can be treated as a bit field; that is, a set of.
Definition: attribute.h:41
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Represents a particular type and provides information about it.
Definition: type_info.h:109
ObjectPtr GetCustomAttribute(const TypeInfo &attributeType) const
Searches for the custom attribute applied having the specified type and applied to the type reprsente...
ArrayPtr< ObjectPtr > GetCustomAttributes() const
Returns an array containing objects that represent all custom attributes applied to the type.
Definition: db_command.h:9