CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
member_info.h
1
2#ifndef _aspose_system_reflection_member_info_h_
3#define _aspose_system_reflection_member_info_h_
4
5#include <system/object.h>
6#include <system/string.h>
7#include <system/reflection/member_types.h>
8
9namespace System { namespace Reflection {
10
15class ASPOSECPP_SHARED_CLASS MemberInfo : public System::Object
16{
17public:
20
25 {
26 public:
28 friend MemberInfo;
31 const String& get_Name() const { return m_name; }
34 const String& get_FullName() const { return m_full_name; }
35
36 private:
38 String m_name;
40 String m_full_name;
41 };
42
45 ASPOSECPP_SHARED_API const String& get_Name() const;
48 ASPOSECPP_SHARED_API TypeInfo get_DeclaringType() const;
51 ASPOSECPP_SHARED_API TypeInfo get_ReflectedType() const;
54 ASPOSECPP_SHARED_API const String& get_FullName() const;
55
59 ASPOSECPP_SHARED_API virtual MemberTypes get_MemberType() const = 0;
60
64 ASPOSECPP_SHARED_API ArrayPtr<SharedPtr<Object>> GetCustomAttributes(const TypeInfo& attributeType, bool inherit = false) const;
65
68 ASPOSECPP_SHARED_API ArrayPtr<SharedPtr<Object>> GetCustomAttributes(bool inherit = false) const;
69
72 ASPOSECPP_SHARED_API void AddAttribute(const ObjectPtr& attribute);
73
74
75protected:
78 ASPOSECPP_SHARED_API MemberInfo(const String& full_name);
79
86
88 typedef std::vector<ObjectPtr> ObjectVector;
91};
92
93}}
94
95#endif
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Declaring type desription. This type should be allocated on stack and passed to functions by value or...
Definition: member_info.h:25
const String & get_Name() const
Gets type short name.
Definition: member_info.h:31
friend MemberInfo
Friend declaration.
Definition: member_info.h:28
const String & get_FullName() const
Gets type full name.
Definition: member_info.h:34
Provides reflection information on members. Objects of this class should only be allocated using Syst...
Definition: member_info.h:16
SharedPtr< Object > ObjectPtr
Alias for a shared pointer to Object.
Definition: member_info.h:19
const String & get_Name() const
Gets member name.
TypeInternal m_type_internal
Declaring type description.
Definition: member_info.h:85
String m_name
Member name.
Definition: member_info.h:83
void AddAttribute(const ObjectPtr &attribute)
Adds attribute to collection.
ObjectVector m_attributes
Type's attributes.
Definition: member_info.h:90
TypeInfo get_DeclaringType() const
Gets declaring type.
TypeInfo get_ReflectedType() const
Gets reflected type type.
String m_full_name
Member full name.
Definition: member_info.h:81
ArrayPtr< SharedPtr< Object > > GetCustomAttributes(const TypeInfo &attributeType, bool inherit=false) const
Returns an array containing objects that represent all custom attributes applied to the type represen...
MemberInfo(const String &full_name)
Constructor.
virtual MemberTypes get_MemberType() const =0
Gets a System::Reflection::MemberTypes value indicating the type of the member - method,...
std::vector< ObjectPtr > ObjectVector
Alias for a vector of shared pointers to Object.
Definition: member_info.h:88
ArrayPtr< SharedPtr< Object > > GetCustomAttributes(bool inherit=false) const
Returns an array containing objects that represent all custom attributes applied to the type represen...
const String & get_FullName() const
Gets member full name. Can be different in manually implemented parts.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents a particular type and provides information about it.
Definition: type_info.h:109
MemberTypes
Marks each type of member.
Definition: member_types.h:11
Definition: db_command.h:9