Changeset 140 in dev for BasicCompiler_Common/src
- Timestamp:
- Jun 15, 2007, 4:00:25 AM (17 years ago)
- Location:
- BasicCompiler_Common/src
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/src/Namespace.cpp
r107 r140 3 3 4 4 NamespaceScopes::NamespaceScopes( const string &namespaceStr ){ 5 int i = 0; 6 while( i < (int)namespaceStr.size() ){ 7 char temporary[VN_SIZE]; 8 for( int i2=0; ; i2++, i++ ){ 9 if( namespaceStr[i] == '.' || namespaceStr[i] == '\0' ){ 10 temporary[i2] = 0; 11 break; 12 } 13 temporary[i2] = namespaceStr[i]; 5 if( namespaceStr.size() == 0 ){ 6 return; 7 } 8 9 string::size_type i = 0; 10 while( true ){ 11 string::size_type i2 = namespaceStr.find( '.', i ); 12 13 string tempName = namespaceStr.substr( i, i2-i ); 14 15 push_back( tempName ); 16 17 if( i2 == string::npos ){ 18 break; 14 19 } 15 push_back( temporary );16 20 17 if( namespaceStr[i] == '.' ){ 18 i++; 19 } 21 i = i2 + 1; 20 22 } 21 23 }
Note:
See TracChangeset
for help on using the changeset viewer.