CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
parameter_info.h
1
2#pragma once
3
4#include <system/object.h>
5#include <system/string.h>
6#include <system/shared_ptr.h>
7#include <system/array.h>
8#include <system/type_info.h>
9
10namespace System { namespace Reflection {
11
16class ASPOSECPP_SHARED_CLASS ParameterInfo : public System::Object
17{
18public:
20 ASPOSECPP_SHARED_API ParameterInfo();
21
26 ASPOSECPP_SHARED_API ParameterInfo(const String& name, int position, const TypeInfo& type);
27
30 ASPOSECPP_SHARED_API String get_Name() const;
33 ASPOSECPP_SHARED_API int get_Position() const;
36 ASPOSECPP_SHARED_API TypeInfo get_ParameterType() const;
37
40 ASPOSECPP_SHARED_API bool get_IsOptional() const;
43 ASPOSECPP_SHARED_API bool get_IsOut() const;
46 ASPOSECPP_SHARED_API bool get_IsIn() const;
49 ASPOSECPP_SHARED_API bool get_IsRetval() const;
50
53 ASPOSECPP_SHARED_API SharedPtr<Object> get_DefaultValue() const;
54
57 ASPOSECPP_SHARED_API String ToString() const override;
58
61 ASPOSECPP_SHARED_API void SetName(const String& name);
64 ASPOSECPP_SHARED_API void SetPosition(int position);
67 ASPOSECPP_SHARED_API void SetParameterType(const TypeInfo& type);
70 ASPOSECPP_SHARED_API void SetOptional(bool value);
71
72protected:
74 ASPOSECPP_SHARED_API ~ParameterInfo() override;
75
87 bool m_is_in;
92};
93
94}} // namespace System { namespace Reflection {
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Discovers the attributes of a parameter and provides access to parameter metadata....
Definition: parameter_info.h:17
void SetParameterType(const TypeInfo &type)
Sets the type of the parameter.
void SetPosition(int position)
Sets the position of the parameter in the parameter list.
void SetName(const String &name)
Sets the name of the parameter.
ParameterInfo()
Initializes a new instance of the ParameterInfo class.
ParameterInfo(const String &name, int position, const TypeInfo &type)
Initializes a new instance of the ParameterInfo class.
String get_Name() const
Gets the name of the parameter.
String m_name
Parameter name.
Definition: parameter_info.h:77
bool m_is_out
Out flag.
Definition: parameter_info.h:85
~ParameterInfo() override
Destructor.
bool m_is_retval
Retval flag.
Definition: parameter_info.h:89
void SetOptional(bool value)
Sets the optional flag.
bool m_is_optional
Optional flag.
Definition: parameter_info.h:83
bool get_IsOptional() const
Gets a value indicating whether this parameter is optional.
SharedPtr< Object > m_default_value
Default value.
Definition: parameter_info.h:91
bool get_IsOut() const
Gets a value indicating whether this is an output parameter.
int get_Position() const
Gets the zero-based position of the parameter in the formal parameter list.
int m_position
Zero-based position of the parameter in the formal parameter list.
Definition: parameter_info.h:79
bool get_IsRetval() const
Gets a value indicating whether this is a Retval parameter.
bool m_is_in
In flag.
Definition: parameter_info.h:87
TypeInfo get_ParameterType() const
Gets the type of this parameter.
SharedPtr< Object > get_DefaultValue() const
Gets the default value of the parameter.
bool get_IsIn() const
Gets a value indicating whether this is an input parameter.
TypeInfo m_type
Parameter type.
Definition: parameter_info.h:81
String ToString() const override
Returns a string that represents the current ParameterInfo.
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:126
Represents a particular type and provides information about it.
Definition: type_info.h:109
Definition: db_command.h:9