Rev | Line | |
---|
[100] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #include <vector>
|
---|
| 4 | #include <string>
|
---|
| 5 | #include <boost/foreach.hpp>
|
---|
| 6 |
|
---|
| 7 | using namespace std;
|
---|
| 8 |
|
---|
| 9 | class NamespaceScopes : public vector<string>
|
---|
| 10 | {
|
---|
| 11 | public:
|
---|
| 12 | NamespaceScopes(){}
|
---|
| 13 | ~NamespaceScopes(){}
|
---|
| 14 |
|
---|
| 15 | void ToString( string &namespaceStr ) const
|
---|
| 16 | {
|
---|
| 17 | const vector<string> &me = *this;
|
---|
| 18 |
|
---|
| 19 | bool isFirst = true;
|
---|
| 20 | BOOST_FOREACH( const string &itemStr, me ){
|
---|
| 21 | if( isFirst ){
|
---|
| 22 | isFirst = false;
|
---|
| 23 | }
|
---|
| 24 | else{
|
---|
| 25 | namespaceStr += ".";
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | namespaceStr += itemStr;
|
---|
| 29 | }
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | bool Equal( const string &name ) const
|
---|
| 33 | {
|
---|
| 34 | string tempName;
|
---|
| 35 | ToString( tempName );
|
---|
| 36 | if( tempName == name ){
|
---|
| 37 | return true;
|
---|
| 38 | }
|
---|
| 39 | return false;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | bool IsUsing() const
|
---|
| 43 | {
|
---|
| 44 | return false;
|
---|
| 45 | }
|
---|
| 46 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.