aboutsummaryrefslogtreecommitdiff
path: root/src/target.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 18:21:03 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 18:21:03 +0000
commitc435c7daa9df1b08dc85132fcd1c154bea9b69e2 (patch)
tree5537f3c91a67b35c4c8aa918b708b7e4aad8f146 /src/target.cpp
parent59690513123de8904eef2a03fe7fcaaed98b1b7b (diff)
downloadbuild-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.gz
build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.bz2
build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.tar.xz
build-c435c7daa9df1b08dc85132fcd1c154bea9b69e2.zip
Fixes to use libbu++ Bu::String
Diffstat (limited to 'src/target.cpp')
-rw-r--r--src/target.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/target.cpp b/src/target.cpp
index 958fcf5..3a90c01 100644
--- a/src/target.cpp
+++ b/src/target.cpp
@@ -23,7 +23,7 @@ Target::Target( bool bExplicit ) :
23{ 23{
24} 24}
25 25
26Target::Target( const Bu::FString &sOutput, bool bExplicit ) : 26Target::Target( const Bu::String &sOutput, bool bExplicit ) :
27 bExplicit( bExplicit ), 27 bExplicit( bExplicit ),
28 lsOutput( sOutput ), 28 lsOutput( sOutput ),
29 iDepCount( 0 ) 29 iDepCount( 0 )
@@ -34,7 +34,7 @@ Target::~Target()
34{ 34{
35} 35}
36 36
37void Target::addInput( const Bu::FString &sInput ) 37void Target::addInput( const Bu::String &sInput )
38{ 38{
39 lsInput.append( sInput ); 39 lsInput.append( sInput );
40} 40}
@@ -62,7 +62,7 @@ void Target::resetInputList( const StrList &lInputs )
62 } 62 }
63} 63}
64 64
65void Target::addRequires( const Bu::FString &sReq ) 65void Target::addRequires( const Bu::String &sReq )
66{ 66{
67 lsRequires.append( sReq ); 67 lsRequires.append( sReq );
68} 68}
@@ -101,7 +101,7 @@ void Target::buildRequires( Runner &r )
101 { 101 {
102 for( VarList::iterator j = v.begin(); j; j++ ) 102 for( VarList::iterator j = v.begin(); j; j++ )
103 { 103 {
104 Bu::FString sReq = (*j).toString(); 104 Bu::String sReq = (*j).toString();
105 addRequires( sReq ); 105 addRequires( sReq );
106 /* try 106 /* try
107 { 107 {
@@ -112,7 +112,7 @@ void Target::buildRequires( Runner &r )
112 } 112 }
113 else 113 else
114 { 114 {
115 Bu::FString sReq = v.toString(); 115 Bu::String sReq = v.toString();
116 addRequires( sReq ); 116 addRequires( sReq );
117 /* try 117 /* try
118 { 118 {
@@ -127,7 +127,7 @@ void Target::buildRequires( Runner &r )
127 c.setRequires( lsOutput.first(), lsRequires ); 127 c.setRequires( lsOutput.first(), lsRequires );
128} 128}
129 129
130void Target::addOutput( const Bu::FString &sOutput ) 130void Target::addOutput( const Bu::String &sOutput )
131{ 131{
132 lsOutput.append( sOutput ); 132 lsOutput.append( sOutput );
133} 133}
@@ -137,22 +137,22 @@ const StrList &Target::getOutputList() const
137 return lsOutput; 137 return lsOutput;
138} 138}
139 139
140void Target::setPrefix( const Bu::FString &sPrefix ) 140void Target::setPrefix( const Bu::String &sPrefix )
141{ 141{
142 this->sPrefix = sPrefix; 142 this->sPrefix = sPrefix;
143} 143}
144 144
145const Bu::FString &Target::getPrefix() const 145const Bu::String &Target::getPrefix() const
146{ 146{
147 return sPrefix; 147 return sPrefix;
148} 148}
149 149
150void Target::setRule( const Bu::FString &sRule ) 150void Target::setRule( const Bu::String &sRule )
151{ 151{
152 this->sRule = sRule; 152 this->sRule = sRule;
153} 153}
154 154
155const Bu::FString &Target::getRule() const 155const Bu::String &Target::getRule() const
156{ 156{
157 return sRule; 157 return sRule;
158} 158}
@@ -196,12 +196,12 @@ void Target::addProfile( const class Profile *pSrc )
196 hProfiles.insert( pSrc->getName(), new Profile( *pSrc ) ); 196 hProfiles.insert( pSrc->getName(), new Profile( *pSrc ) );
197} 197}
198 198
199bool Target::hasProfile( const Bu::FString &sName ) const 199bool Target::hasProfile( const Bu::String &sName ) const
200{ 200{
201 return hProfiles.has( sName ); 201 return hProfiles.has( sName );
202} 202}
203 203
204const Profile *Target::getProfile( const Bu::FString &sName ) const 204const Profile *Target::getProfile( const Bu::String &sName ) const
205{ 205{
206 return hProfiles.get( sName ); 206 return hProfiles.get( sName );
207} 207}
@@ -217,18 +217,18 @@ const VarHash &Target::getVars() const
217 return hVars; 217 return hVars;
218} 218}
219 219
220void Target::setDisplay( const Bu::FString &sNewDisplay ) 220void Target::setDisplay( const Bu::String &sNewDisplay )
221{ 221{
222 if( !sDisplay.isSet() ) 222 if( !sDisplay.isSet() )
223 sDisplay = sNewDisplay; 223 sDisplay = sNewDisplay;
224} 224}
225 225
226const Bu::FString &Target::getDisplay() const 226const Bu::String &Target::getDisplay() const
227{ 227{
228 return sDisplay; 228 return sDisplay;
229} 229}
230 230
231void Target::process( class Runner &r, const Bu::FString &sProfile ) 231void Target::process( class Runner &r, const Bu::String &sProfile )
232{ 232{
233 r.getContext().getView()->beginTarget( sProfile, *this ); 233 r.getContext().getView()->beginTarget( sProfile, *this );
234 bRun = true; 234 bRun = true;
@@ -320,7 +320,7 @@ void Target::mergeUnder( const Target *pSrc )
320 320
321void Target::merge( StrList &lOut, const StrList &lIn ) 321void Target::merge( StrList &lOut, const StrList &lIn )
322{ 322{
323 Bu::Heap<Bu::FString> hStr; 323 Bu::Heap<Bu::String> hStr;
324 for( StrList::const_iterator i = lOut.begin(); i; i++ ) 324 for( StrList::const_iterator i = lOut.begin(); i; i++ )
325 { 325 {
326 hStr.enqueue( *i ); 326 hStr.enqueue( *i );