retdec
include
retdec
fileformat
types
dotnet_types
dotnet_type.h
Go to the documentation of this file.
1
7
#ifndef RETDEC_FILEFORMAT_TYPES_DOTNET_TYPES_DOTNET_TYPE_H
8
#define RETDEC_FILEFORMAT_TYPES_DOTNET_TYPES_DOTNET_TYPE_H
9
10
#include <cstdint>
11
#include <string>
12
13
namespace
retdec
{
14
namespace
fileformat
{
15
19
enum class
DotnetTypeVisibility
20
{
21
Public
,
22
Protected
,
23
Private
24
};
25
29
class
DotnetType
30
{
31
protected
:
32
std::string
name
;
33
std::string
nameSpace
;
34
DotnetTypeVisibility
visibility
;
35
public
:
36
virtual
~DotnetType
() =
default
;
37
40
std::string
getName
()
const
{
return
name
; }
41
const
std::string&
getNameSpace
()
const
{
return
nameSpace
; }
42
DotnetTypeVisibility
getVisibility
()
const
{
return
visibility
; }
43
std::string
getFullyQualifiedName
()
const
{
return
nameSpace
.empty() ?
name
:
nameSpace
+
'.'
+
name
; }
44
const
std::string&
getVisibilityString
()
const
;
46
49
void
setName
(
const
std::string& typeName) {
name
= typeName; }
50
void
setNameSpace
(
const
std::string& typeNameSpace) {
nameSpace
= typeNameSpace; }
51
void
setVisibility
(
DotnetTypeVisibility
typeVisibility) {
visibility
= typeVisibility; }
53
56
bool
isPublic
()
const
{
return
visibility
==
DotnetTypeVisibility::Public
; }
57
bool
isProtected
()
const
{
return
visibility
==
DotnetTypeVisibility::Protected
; }
58
bool
isPrivate
()
const
{
return
visibility
==
DotnetTypeVisibility::Private
; }
60
};
61
62
}
// namespace fileformat
63
}
// namespace retdec
64
65
#endif
retdec::fileformat::DotnetType
Definition:
dotnet_type.h:30
retdec::fileformat::DotnetType::~DotnetType
virtual ~DotnetType()=default
retdec::fileformat::DotnetType::name
std::string name
Definition:
dotnet_type.h:32
retdec::fileformat::DotnetType::getNameSpace
const std::string & getNameSpace() const
Definition:
dotnet_type.h:41
retdec::fileformat::DotnetType::getVisibility
DotnetTypeVisibility getVisibility() const
Definition:
dotnet_type.h:42
retdec::fileformat::DotnetType::isPublic
bool isPublic() const
Definition:
dotnet_type.h:56
retdec::fileformat::DotnetType::visibility
DotnetTypeVisibility visibility
Definition:
dotnet_type.h:34
retdec::fileformat::DotnetType::setVisibility
void setVisibility(DotnetTypeVisibility typeVisibility)
Definition:
dotnet_type.h:51
retdec::fileformat::DotnetType::setNameSpace
void setNameSpace(const std::string &typeNameSpace)
Definition:
dotnet_type.h:50
retdec::fileformat::DotnetType::getName
std::string getName() const
Definition:
dotnet_type.h:40
retdec::fileformat::DotnetType::isProtected
bool isProtected() const
Definition:
dotnet_type.h:57
retdec::fileformat::DotnetType::isPrivate
bool isPrivate() const
Definition:
dotnet_type.h:58
retdec::fileformat::DotnetType::nameSpace
std::string nameSpace
Definition:
dotnet_type.h:33
retdec::fileformat::DotnetType::setName
void setName(const std::string &typeName)
Definition:
dotnet_type.h:49
retdec::fileformat::DotnetType::getVisibilityString
const std::string & getVisibilityString() const
Definition:
dotnet_type.cpp:27
retdec::fileformat::DotnetType::getFullyQualifiedName
std::string getFullyQualifiedName() const
Definition:
dotnet_type.h:43
fileformat
retdec::fileformat::DotnetTypeVisibility
DotnetTypeVisibility
Definition:
dotnet_type.h:20
retdec::fileformat::DotnetTypeVisibility::Public
@ Public
retdec::fileformat::DotnetTypeVisibility::Private
@ Private
retdec::fileformat::DotnetTypeVisibility::Protected
@ Protected
retdec
Definition:
archive_wrapper.h:19
Generated on Tue Aug 8 2023 10:45:48 for retdec by
1.9.1