1
2
3
4
5
6 #ifndef CMAJOR_BINDER_BOUND_NAMESPACE_INCLUDED
7 #define CMAJOR_BINDER_BOUND_NAMESPACE_INCLUDED
8 #include <cmajor/binder/BoundNode.hpp>
9 #include <sngcm/ast/Namespace.hpp>
10
11 namespace cmajor { namespace binder {
12
13 using namespace sngcm::ast;
14
15 class BoundNamespace : public BoundNode
16 {
17 public:
18 BoundNamespace(NamespaceNode& namespaceNode_);
19 BoundNamespace(const BoundNamespace&) = delete;
20 BoundNamespace& operator=(const BoundNamespace&) = delete;
21 void Accept(BoundNodeVisitor& visitor) override;
22 void Load(Emitter& emitter, OperationFlags flags) override;
23 void Store(Emitter& emitter, OperationFlags flags) override;
24 NamespaceNode& GetNamespaceNode() { return namespaceNode; }
25 void AddMember(std::std::unique_ptr<BoundNode>&&member);
26 const std::std::vector<std::std::unique_ptr<BoundNode>>&Members() const{returnmembers;}
27 private:
28 NamespaceNode& namespaceNode;
29 std::vector<std::std::unique_ptr<BoundNode>>members;
30 };
31
32 } }
33
34 #endif // CMAJOR_BINDER_BOUND_NAMESPACE_INCLUDED