aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/action.cpp25
-rw-r--r--src/action.h1
-rw-r--r--src/context.cpp4
3 files changed, 30 insertions, 0 deletions
diff --git a/src/action.cpp b/src/action.cpp
index 23c24cd..8b10641 100644
--- a/src/action.cpp
+++ b/src/action.cpp
@@ -80,6 +80,31 @@ Action *Action::genDefaultClean()
80 return pRet; 80 return pRet;
81} 81}
82 82
83Action *Action::genDefaultCleanAll()
84{
85 Ast *pAst = new Ast();
86 pAst->addNode( AstNode::typeActionDef );
87 pAst->openBranch();
88 pAst->addNode( AstNode::typeString, "clean-all" );
89 pAst->openBranch();
90 pAst->addNode( AstNode::typeProcessTarget );
91 pAst->openBranch();
92 pAst->addNode( AstNode::typeString, "clean" );
93 pAst->openBranch();
94 pAst->addNode( AstNode::typeFunction );
95 pAst->openBranch();
96 pAst->addNode( AstNode::typeString, "targets" );
97 pAst->closeNode();
98 pAst->closeNode();
99 pAst->closeNode();
100 Action *pRet = new Action(
101 dynamic_cast<const AstBranch *>( *pAst->getNodeBegin() )
102 );
103 pRet->pAst = pAst;
104
105 return pRet;
106}
107
83Action *Action::genDefaultDefault() 108Action *Action::genDefaultDefault()
84{ 109{
85 Ast *pAst = new Ast(); 110 Ast *pAst = new Ast();
diff --git a/src/action.h b/src/action.h
index 520f2f1..7f60095 100644
--- a/src/action.h
+++ b/src/action.h
@@ -15,6 +15,7 @@ public:
15 15
16 static Action *genDefaultAll(); 16 static Action *genDefaultAll();
17 static Action *genDefaultClean(); 17 static Action *genDefaultClean();
18 static Action *genDefaultCleanAll();
18 static Action *genDefaultDefault(); 19 static Action *genDefaultDefault();
19 20
20private: 21private:
diff --git a/src/context.cpp b/src/context.cpp
index c257a75..bc48def 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -438,6 +438,10 @@ void Context::genDefaultActions()
438 { 438 {
439 addAction( Action::genDefaultClean() ); 439 addAction( Action::genDefaultClean() );
440 } 440 }
441 if( !hAction.has("clean-all") )
442 {
443 addAction( Action::genDefaultCleanAll() );
444 }
441 if( !hAction.has("default") ) 445 if( !hAction.has("default") )
442 { 446 {
443 addAction( Action::genDefaultDefault() ); 447 addAction( Action::genDefaultDefault() );