siplasplas
A library for C++ reflection and introspection
namespace.hpp
1 #ifndef SIPLASPLAS_REFLECTION_DYNAMIC_NAMESPACE_HPP
2 #define SIPLASPLAS_REFLECTION_DYNAMIC_NAMESPACE_HPP
3 
4 #include "entity.hpp"
5 #include "class.hpp"
6 #include "enum.hpp"
7 #include <unordered_map>
8 
9 namespace cpp
10 {
11 
12 namespace dynamic_reflection
13 {
14 
19 class SIPLASPLAS_REFLECTION_DYNAMIC_EXPORT Namespace : public Entity
20 {
21 public:
29  static std::shared_ptr<Namespace> create(const SourceInfo& sourceInfo);
30 
42  static Namespace& fromEntity(const std::shared_ptr<Entity>& entity);
43 
51  Namespace& namespace_(const std::string& name);
52 
63  Class& class_(const std::string& name);
64 
75  Enum& enum_(const std::string& name);
76 
77 private:
78  Namespace(const SourceInfo& sourceInfo);
79 };
80 
81 }
82 
83 }
84 
85 #endif // SIPLASPLAS_REFLECTION_DYNAMIC_NAMESPACE_HPP
Definition: canary_allocator.hpp:7
Stores dynamic reflection information of a class type.
Definition: class.hpp:20
Stores dynamic reflection information of a namespace.
Definition: namespace.hpp:19
Stores dynamic reflection information of an enumeration type.
Definition: enum.hpp:18
Represents a C++ semantic entity (Class, function, namespace, etc) and manages its dynamic reflection...
Definition: entity.hpp:22