Changeset 509 in dev for trunk/ab5.0/abdev/ab_common


Ignore:
Timestamp:
Apr 29, 2008, 12:27:10 PM (16 years ago)
Author:
dai_9181
Message:

Symbolクラスをab_commonプロジェクトに移動した。

Location:
trunk/ab5.0/abdev/ab_common
Files:
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/ab_common.vcproj

    r507 r509  
    324324                    >
    325325                </File>
     326                <File
     327                    RelativePath=".\include\Symbol.h"
     328                    >
     329                </File>
    326330            </Filter>
    327331        </Filter>
     
    350354                    >
    351355                </File>
     356                <File
     357                    RelativePath=".\src\Symbol.cpp"
     358                    >
     359                </File>
    352360            </Filter>
    353361        </Filter>
  • trunk/ab5.0/abdev/ab_common/include/Symbol.h

    r508 r509  
    11#pragma once
    22
    3 #include <vector>
    4 #include <string>
     3namespace ActiveBasic{ namespace Common{ namespace Lexical{
    54
    6 #include <BoostSerializationSupport.h>
    7 
    8 using namespace std;
    95
    106class Symbol
     
    139
    1410    NamespaceScopes namespaceScopes;
    15     string name;
     11    std::string name;
    1612
    1713    // XMLシリアライズ用
     
    4137public:
    4238    bool isTargetObjectModule;
    43     Symbol( const NamespaceScopes &namespaceScopes, const string &name )
     39    Symbol( const NamespaceScopes &namespaceScopes, const std::string &name )
    4440        : namespaceScopes( namespaceScopes )
    4541        , name( name )
     
    6763        return namespaceScopes;
    6864    }
    69     const string &GetName() const
     65    const std::string &GetName() const
    7066    {
    7167        return name;
     
    7470
    7571    // シンボル比較
    76     bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
     72    bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const std::string &name ) const;
    7773    bool IsEqualSymbol( const Symbol &symbol ) const;
    78     bool IsEqualSymbol( const char *fullName ) const;
    79     bool IsEqualSymbol( const string &fullName ) const
    80     {
    81         return IsEqualSymbol( fullName.c_str() );
    82     }
    8374};
     75
     76
     77}}}
  • trunk/ab5.0/abdev/ab_common/src/Symbol.cpp

    r508 r509  
    11#include "stdafx.h"
    22
    3 #include <Compiler.h>
    4 #include <Symbol.h>
     3using namespace ActiveBasic::Common::Lexical;
    54
    65const NamespaceSupporter *Symbol::namespaceSupporter = NULL;
     
    1615}
    1716
    18 bool Symbol::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const
     17bool Symbol::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const std::string &name ) const
    1918{
    2019    if( GetName() != name ){
     
    3635        // 静的メンバを考慮
    3736        NamespaceScopes namespaceScopes( symbol.GetNamespaceScopes() );
    38         string name = namespaceScopes[namespaceScopes.size()-1] + "." + symbol.GetName();
     37        std::string name = namespaceScopes[namespaceScopes.size()-1] + "." + symbol.GetName();
    3938        namespaceScopes.pop_back();
    4039
     
    4342    return false;
    4443}
    45 bool Symbol::IsEqualSymbol( const char *fullName ) const
    46 {
    47     char AreaName[VN_SIZE] = "";        //オブジェクト変数
    48     char NestName[VN_SIZE] = "";        //入れ子メンバ
    49     bool isNest = SplitMemberName( fullName, AreaName, NestName );
    50 
    51     if( IsEqualSymbol( NamespaceScopes( AreaName ), NestName ) ){
    52         return true;
    53     }
    54 
    55     return false;
    56 }
  • trunk/ab5.0/abdev/ab_common/stdafx.h

    r507 r509  
    3535#include <Namespace.h>
    3636#include <NamespaceSupporter.h>
     37#include <Symbol.h>
Note: See TracChangeset for help on using the changeset viewer.