-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathcpp_forward_class_decl.h
More file actions
70 lines (57 loc) · 1.42 KB
/
Copy pathcpp_forward_class_decl.h
File metadata and controls
70 lines (57 loc) · 1.42 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
// Copyright (C) 2022 Satya Das and CppParser contributors
// SPDX-License-Identifier: MIT
#ifndef A69CD04B_3287_4606_9871_35F46730C08F
#define A69CD04B_3287_4606_9871_35F46730C08F
#include "cppast/cpp_compound.h"
#include "cppast/cpp_entity.h"
#include "cppast/cpp_templatable_entity.h"
namespace cppast {
class CppForwardClassDecl : public CppEntity, public CppTemplatableEntity
{
public:
static constexpr auto EntityType()
{
return CppEntityType::FORWARD_CLASS_DECL;
}
public:
CppForwardClassDecl(std::string name, std::string apidecor, CppCompoundType cmpType = CppCompoundType::UNKNOWN)
: CppEntity(EntityType())
, compoundType_(cmpType)
, name_(std::move(name))
, apidecor_(std::move(apidecor))
, attr_(0)
{
}
CppForwardClassDecl(std::string name, CppCompoundType cmpType = CppCompoundType::UNKNOWN)
: CppForwardClassDecl(name, std::string(), cmpType)
{
}
public:
CppCompoundType compoundType() const
{
return compoundType_;
}
const std::string& name() const
{
return name_;
}
const std::string& apidecor() const
{
return apidecor_;
}
std::uint32_t attr() const
{
return attr_;
}
void addAttr(std::uint32_t attr)
{
attr_ |= attr;
}
private:
CppCompoundType compoundType_;
std::string name_;
std::string apidecor_;
std::uint32_t attr_ {0};
};
} // namespace cppast
#endif /* A69CD04B_3287_4606_9871_35F46730C08F */