source: dev/trunk/abdev/BasicCompiler_Common/include/Symbol.h@ 206

Last change on this file since 206 was 206, checked in by dai_9181, 17 years ago

コード全体のリファクタリングを実施

File size: 1.2 KB
Line 
1#pragma once
2
3#include <vector>
4#include <string>
5
6#include <jenga/include/common/BoostXmlSupport.h>
7
8#include <jenga/include/smoothie/Namespace.h>
9
10using namespace std;
11
12class Symbol
13{
14 NamespaceScopes namespaceScopes;
15 string name;
16
17 // XMLシリアライズ用
18private:
19 friend class boost::serialization::access;
20 template<class Archive> void serialize(Archive& ar, const unsigned int version)
21 {
22 ar & BOOST_SERIALIZATION_NVP( namespaceScopes );
23 ar & BOOST_SERIALIZATION_NVP( name );
24 }
25
26public:
27 Symbol( const NamespaceScopes &namespaceScopes, const string &name )
28 : namespaceScopes( namespaceScopes )
29 , name( name )
30 {
31 }
32 Symbol( const char *fullName );
33 Symbol( const string &fullName );
34 Symbol( const Symbol &symbol )
35 : namespaceScopes( symbol.namespaceScopes )
36 , name( symbol.name )
37 {
38 }
39 Symbol()
40 {
41 }
42
43 const NamespaceScopes &GetNamespaceScopes() const
44 {
45 return namespaceScopes;
46 }
47 const string &GetName() const
48 {
49 return name;
50 }
51
52 // シンボル比較
53 bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
54 bool IsEqualSymbol( const Symbol &symbol ) const;
55 bool IsEqualSymbol( const string &name ) const;
56};
Note: See TracBrowser for help on using the repository browser.