diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:21:03 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:21:03 +0000 |
commit | c435c7daa9df1b08dc85132fcd1c154bea9b69e2 (patch) | |
tree | 5537f3c91a67b35c4c8aa918b708b7e4aad8f146 /src/runner.cpp | |
parent | 59690513123de8904eef2a03fe7fcaaed98b1b7b (diff) | |
download | build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.gz build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.bz2 build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.xz build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.zip |
Fixes to use libbu++ Bu::String
Diffstat (limited to '')
-rw-r--r-- | src/runner.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/runner.cpp b/src/runner.cpp index e1f3da9..64ad8e8 100644 --- a/src/runner.cpp +++ b/src/runner.cpp | |||
@@ -47,7 +47,7 @@ void Runner::initialize() | |||
47 | 47 | ||
48 | Variable Runner::execFunc( const AstBranch *pFunc, Variable &vIn ) | 48 | Variable Runner::execFunc( const AstBranch *pFunc, Variable &vIn ) |
49 | { | 49 | { |
50 | Bu::FString sName = dynamic_cast<const AstLeaf *>( | 50 | Bu::String sName = dynamic_cast<const AstLeaf *>( |
51 | (*pFunc->getBranchBegin()).first())->getStrValue(); | 51 | (*pFunc->getBranchBegin()).first())->getStrValue(); |
52 | 52 | ||
53 | VarList lParams; | 53 | VarList lParams; |
@@ -382,7 +382,7 @@ Variable Runner::run( AstBranch::NodeList::const_iterator n ) | |||
382 | { | 382 | { |
383 | case AstNode::typeError: | 383 | case AstNode::typeError: |
384 | { | 384 | { |
385 | Bu::FString sMsg = rCont.expand( pExpr->getStrValue() ); | 385 | Bu::String sMsg = rCont.expand( pExpr->getStrValue() ); |
386 | rCont.getView()->userError( sMsg.getStr() ); | 386 | rCont.getView()->userError( sMsg.getStr() ); |
387 | throw Bu::ExceptionBase( sMsg.getStr() ); | 387 | throw Bu::ExceptionBase( sMsg.getStr() ); |
388 | } | 388 | } |
@@ -470,7 +470,7 @@ Variable Runner::run( AstBranch::NodeList::const_iterator n ) | |||
470 | { | 470 | { |
471 | AstBranch::NodeList::const_iterator n = | 471 | AstBranch::NodeList::const_iterator n = |
472 | (*pExpr->getBranchBegin()).begin(); | 472 | (*pExpr->getBranchBegin()).begin(); |
473 | Bu::FString sVar = dynamic_cast<const AstLeaf *>( | 473 | Bu::String sVar = dynamic_cast<const AstLeaf *>( |
474 | *n )->getStrValue(); | 474 | *n )->getStrValue(); |
475 | rCont.delVariable( sVar ); | 475 | rCont.delVariable( sVar ); |
476 | } | 476 | } |
@@ -511,7 +511,7 @@ Variable Runner::run( AstBranch::NodeList::const_iterator n ) | |||
511 | { | 511 | { |
512 | AstBranch::BranchList::const_iterator b = | 512 | AstBranch::BranchList::const_iterator b = |
513 | pExpr->getBranchBegin(); | 513 | pExpr->getBranchBegin(); |
514 | Bu::FString sVar = dynamic_cast<const AstLeaf *>( | 514 | Bu::String sVar = dynamic_cast<const AstLeaf *>( |
515 | (*b).first() )->getStrValue(); | 515 | (*b).first() )->getStrValue(); |
516 | b++; | 516 | b++; |
517 | Variable v = execExpr( (*b).begin() ); | 517 | Variable v = execExpr( (*b).begin() ); |
@@ -585,7 +585,7 @@ Variable Runner::run( AstBranch::NodeList::const_iterator n ) | |||
585 | { | 585 | { |
586 | AstBranch::BranchList::const_iterator b = | 586 | AstBranch::BranchList::const_iterator b = |
587 | pExpr->getBranchBegin(); | 587 | pExpr->getBranchBegin(); |
588 | Bu::FString sName = dynamic_cast<const AstLeaf *>( | 588 | Bu::String sName = dynamic_cast<const AstLeaf *>( |
589 | (*b).first() | 589 | (*b).first() |
590 | )->getStrValue(); | 590 | )->getStrValue(); |
591 | b++; | 591 | b++; |
@@ -709,7 +709,7 @@ Variable Runner::run( AstBranch::NodeList::const_iterator n ) | |||
709 | { | 709 | { |
710 | AstBranch::BranchList::const_iterator b = | 710 | AstBranch::BranchList::const_iterator b = |
711 | pExpr->getBranchBegin(); | 711 | pExpr->getBranchBegin(); |
712 | Bu::FString sProfile = dynamic_cast<const AstLeaf *>( | 712 | Bu::String sProfile = dynamic_cast<const AstLeaf *>( |
713 | (*b).first() | 713 | (*b).first() |
714 | )->getStrValue(); | 714 | )->getStrValue(); |
715 | b++; | 715 | b++; |
@@ -747,7 +747,7 @@ Variable Runner::run( AstBranch::NodeList::const_iterator n ) | |||
747 | } | 747 | } |
748 | else | 748 | else |
749 | { | 749 | { |
750 | Bu::FString sTag = vTags.toString(); | 750 | Bu::String sTag = vTags.toString(); |
751 | if( sTag.isSet() ) | 751 | if( sTag.isSet() ) |
752 | { | 752 | { |
753 | rCont.addTargetToTag( pCurTarget, sTag ); | 753 | rCont.addTargetToTag( pCurTarget, sTag ); |
@@ -774,7 +774,7 @@ Variable Runner::run( AstBranch::NodeList::const_iterator n ) | |||
774 | } | 774 | } |
775 | else | 775 | else |
776 | { | 776 | { |
777 | Bu::FString sTag = vTags.toString(); | 777 | Bu::String sTag = vTags.toString(); |
778 | if( sTag.isSet() ) | 778 | if( sTag.isSet() ) |
779 | { | 779 | { |
780 | pCurRule->addTag( sTag ); | 780 | pCurRule->addTag( sTag ); |
@@ -810,7 +810,7 @@ Variable Runner::run( AstBranch::NodeList::const_iterator n ) | |||
810 | return vReturn; | 810 | return vReturn; |
811 | } | 811 | } |
812 | 812 | ||
813 | void Runner::execProfile( Target *pTarget, const Bu::FString &sProfile ) | 813 | void Runner::execProfile( Target *pTarget, const Bu::String &sProfile ) |
814 | { | 814 | { |
815 | rCont.pushScope( pTarget->getVars() ); | 815 | rCont.pushScope( pTarget->getVars() ); |
816 | run( (*(pTarget->getProfile( sProfile )->getRoot()-> | 816 | run( (*(pTarget->getProfile( sProfile )->getRoot()-> |
@@ -818,7 +818,7 @@ void Runner::execProfile( Target *pTarget, const Bu::FString &sProfile ) | |||
818 | rCont.popScope(); | 818 | rCont.popScope(); |
819 | } | 819 | } |
820 | 820 | ||
821 | void Runner::execAction( const Bu::FString &sName ) | 821 | void Runner::execAction( const Bu::String &sName ) |
822 | { | 822 | { |
823 | try | 823 | try |
824 | { | 824 | { |
@@ -828,7 +828,7 @@ void Runner::execAction( const Bu::FString &sName ) | |||
828 | } | 828 | } |
829 | catch( Bu::HashException &e ) | 829 | catch( Bu::HashException &e ) |
830 | { | 830 | { |
831 | Bu::FString sError("No such action '" + sName + "' found."); | 831 | Bu::String sError("No such action '" + sName + "' found."); |
832 | rCont.getView()->sysError( sError ); | 832 | rCont.getView()->sysError( sError ); |
833 | } | 833 | } |
834 | } | 834 | } |
@@ -838,7 +838,7 @@ Context &Runner::getContext() | |||
838 | return rCont; | 838 | return rCont; |
839 | } | 839 | } |
840 | 840 | ||
841 | Target *Runner::buildTarget( const Bu::FString &sOutput, | 841 | Target *Runner::buildTarget( const Bu::String &sOutput, |
842 | AstBranch::NodeList::const_iterator n ) | 842 | AstBranch::NodeList::const_iterator n ) |
843 | { | 843 | { |
844 | Target *pTrg = NULL; | 844 | Target *pTrg = NULL; |
@@ -868,7 +868,7 @@ Target *Runner::buildTarget( const Bu::FString &sOutput, | |||
868 | return pTrg; | 868 | return pTrg; |
869 | } | 869 | } |
870 | 870 | ||
871 | Rule *Runner::buildRule( const Bu::FString &sName, | 871 | Rule *Runner::buildRule( const Bu::String &sName, |
872 | AstBranch::NodeList::const_iterator n ) | 872 | AstBranch::NodeList::const_iterator n ) |
873 | { | 873 | { |
874 | Rule *pRule = new Rule( sName ); | 874 | Rule *pRule = new Rule( sName ); |
@@ -886,7 +886,7 @@ Variable Runner::doSet( const AstBranch *pRoot ) | |||
886 | { | 886 | { |
887 | AstBranch::NodeList::const_iterator n = | 887 | AstBranch::NodeList::const_iterator n = |
888 | (*pRoot->getBranchBegin()).begin(); | 888 | (*pRoot->getBranchBegin()).begin(); |
889 | Bu::FString sVar = dynamic_cast<const AstLeaf *>( *n )->getStrValue(); | 889 | Bu::String sVar = dynamic_cast<const AstLeaf *>( *n )->getStrValue(); |
890 | n++; | 890 | n++; |
891 | const AstLeaf *pLeaf = dynamic_cast<const AstLeaf *>( *n ); | 891 | const AstLeaf *pLeaf = dynamic_cast<const AstLeaf *>( *n ); |
892 | n++; | 892 | n++; |