Repository navigation
Expand file tree
/
Copy pathmember_info.hpp
More file actions
79 lines (59 loc) · 2.46 KB
/
Copy pathmember_info.hpp
File metadata and controls
79 lines (59 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
Copyright (C) 2015-present The DotCpp Authors.
This file is part of .C++, a native C++ implementation of
popular .NET class library APIs developed to facilitate
code reuse between C# and C++.
http://github.com/dotcpp/dotcpp (source)
http://dotcpp.org (documentation)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <dot/system/object.hpp>
namespace dot
{
class member_info_impl; using member_info = ptr<member_info_impl>;
class member_info_data_impl; using member_info_data = ptr<member_info_data_impl>;
class type_impl; using type = ptr<type_impl>;
/// Data for MemberInfo.
class DOT_CLASS member_info_data_impl : public virtual object_impl
{
typedef member_info_data_impl self;
public: // PROPERTIES
/// Gets the name of the current member.
string name; // TODO - replace by method
protected: // CONSTRUCTORS
/// Create an empty instance of MemberInfoData.
///
/// This constructor is protected. It is used by derived classes only.
member_info_data_impl() = default;
};
/// Obtains information about the attributes of a member and provides access to member metadata.
class member_info_impl : public virtual object_impl
{
typedef member_info_impl self;
public: // METHODS
/// Gets the name of the current member.
string name; // TODO - convert to method
/// Gets the class that declares this member.
type declaring_type; // TODO - convert to method
/// A string representing the name of the current type.
virtual string to_string() override { return "MemberInfo"; }
protected: // CONSTRUCTORS
/// Create from property name and declaring type.
///
/// This constructor is protected. It is used by derived classes only.
member_info_impl(const string& name, type declaring_type)
{
this->name = name;
this->declaring_type = declaring_type;
}
};
}