Ignore:
Timestamp:
Apr 28, 2008, 8:14:31 PM (16 years ago)
Author:
dai_9181
Message:

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

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/include/NamespaceSupporter.h

    r506 r507  
    11#pragma once
     2
     3namespace ActiveBasic{ namespace Common{ namespace Lexical{
     4
    25
    36class NamespaceSupporter
    47{
     8    const NamespaceScopesCollection *allNamespaceScopesCollection;
     9
    510    // Importsされた名前空間
    611    NamespaceScopesCollection importedNamespaces;
     
    1015
    1116public:
     17    NamespaceSupporter()
     18        : allNamespaceScopesCollection( NULL )
     19    {
     20    }
     21
     22    void RegistAllNamespaceScopesCollection( const NamespaceScopesCollection *allNamespaceScopesCollection )
     23    {
     24        this->allNamespaceScopesCollection = allNamespaceScopesCollection;
     25    }
     26
    1227    NamespaceScopesCollection &GetImportedNamespaces()
    1328    {
     
    1833        this->importedNamespaces = namespaces;
    1934    }
     35    bool ImportsNamespace( const NamespaceScopes &namespaceScopes );
    2036    bool ImportsNamespace( const std::string &namespaceStr );
    2137
     
    4056    // entryName =   "ActiveBasic"
    4157    // この場合、living は entryName を包括している。
    42     bool IsCoverd( const NamespaceScopes &namespaceScopes, const string &entryName ) const
     58    bool IsCoverd( const NamespaceScopes &namespaceScopes, const std::string &entryName ) const
    4359    {
    44         if( namespaceScopes.IsEqual( entryName ) ){
     60        if( namespaceScopes.IsEqual( entryName ) )
     61        {
    4562            return true;
    4663        }
    4764
    48         string thisStr = namespaceScopes.ToString();
     65        std::string thisStr = namespaceScopes.ToString();
    4966
    5067        NamespaceScopes tempLivingNamespaceScopes = livingNamespaceScopes;
    5168
    52         while( tempLivingNamespaceScopes.size() ){
    53             string tempStr = tempLivingNamespaceScopes.ToString() + "." + entryName;
    54             if( thisStr == tempStr ){
     69        while( tempLivingNamespaceScopes.size() )
     70        {
     71            std::string tempStr = tempLivingNamespaceScopes.ToString() + "." + entryName;
     72            if( thisStr == tempStr )
     73            {
    5574                return true;
    5675            }
     
    98117    }
    99118};
     119
     120
     121}}}
Note: See TracChangeset for help on using the changeset viewer.