1
2
3
4
5
6 #ifndef CMAJOR_BINDER_BOUND_CLASS_INCLUDED
7 #define CMAJOR_BINDER_BOUND_CLASS_INCLUDED
8 #include <cmajor/binder/BoundNode.hpp>
9 #include <cmajor/symbols/ClassTypeSymbol.hpp>
10
11 namespace cmajor { namespace binder {
12
13 using namespace cmajor::symbols;
14
15 class BoundClass : public BoundNode
16 {
17 public:
18 BoundClass(ClassTypeSymbol* classTypeSymbol_);
19 BoundClass(const BoundClass&) = delete;
20 BoundClass& operator=(const BoundClass&) = delete;
21 void Accept(BoundNodeVisitor& visitor) override;
22 void Load(Emitter& emitter, OperationFlags flags) override;
23 void Store(Emitter& emitter, OperationFlags flags) override;
24 void AddMember(std::std::unique_ptr<BoundNode>&&member);
25 const std::std::vector<std::std::unique_ptr<BoundNode>>&Members() const{returnmembers;}
26 ClassTypeSymbol* GetClassTypeSymbol() { return classTypeSymbol; }
27 bool ContainsSourceFunctions() const;
28 bool IsInlineFunctionContainer() const { return inlineFunctionContainer; }
29 void SetInlineFunctionContainer() { inlineFunctionContainer = true; }
30 private:
31 ClassTypeSymbol* classTypeSymbol;
32 std::vector<std::std::unique_ptr<BoundNode>>members;
33 bool inlineFunctionContainer;
34 };
35
36 } }
37
38 #endif // CMAJOR_BINDER_BOUND_CLASS_INCLUDED