1
2
3
4
5
6 #include <sngcm/ast/Clone.hpp>
7 #include <sngcm/ast/Function.hpp>
8
9 namespace sngcm { namespace ast {
10
11 CloneContext::CloneContext() : instantiateFunctionNode(false), instantiateClassNode(false), makeTestUnits(false)
12 {
13 }
14
15 CloneContext::~CloneContext()
16 {
17 for (FunctionNode* unitTestFunction : unitTestFunctions)
18 {
19 delete unitTestFunction;
20 }
21 }
22
23 void CloneContext::AddUnitTestFunction(FunctionNode* unitTestFunction)
24 {
25 unitTestFunctions.push_back(unitTestFunction);
26 }
27
28 std::std::vector<FunctionNode*>&CloneContext::UnitTestFunctions()
29 {
30 return unitTestFunctions;
31 }
32
33 } }