Ignore:
Timestamp:
Jun 26, 2007, 1:48:18 PM (17 years ago)
Author:
dai_9181
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/include/Compiler.h

    r193 r195  
    88    NativeCode nativeCode;
    99    MetaImpl metaImpl;
    10 
    11     NamespaceScopesCollection importedNamespaces;
    1210
    1311public:
     
    2220    }
    2321
    24     NamespaceScopesCollection &GetImportedNamespaces()
    25     {
    26         return importedNamespaces;
    27     }
    28     void SetImportedNamespaces( const NamespaceScopesCollection &namespaces )
    29     {
    30         this->importedNamespaces = namespaces;
    31     }
    32     bool ImportsNamespace( const std::string &namespaceStr )
    33     {
    34         NamespaceScopes namespaceScopes( namespaceStr );
    35         if( !this->GetMeta().GetNamespaces().IsExist( namespaceScopes ) ){
    36             return false;
    37         }
    38 
    39         this->importedNamespaces.push_back( namespaceScopes );
    40 
    41         return true;
    42     }
    43 
    4422    static bool StringToType( const std::string &typeName, Type &type );
    4523    static const std::string TypeToString( const Type &type );
    46 
    47     // 指定された名前空間が同一エリアと見なされるかどうかをチェック
    48     bool IsSameAreaNamespace( const NamespaceScopes &baseNamespaceScopes, const NamespaceScopes &entryNamespaceScopes ){
    49         if( entryNamespaceScopes.size() ){
    50             if( baseNamespaceScopes.IsCoverd( entryNamespaceScopes ) ){
    51                 // 包括しているときは同一と見なす
    52                 return true;
    53             }
    54         }
    55         else{
    56             if( baseNamespaceScopes.size() ){
    57                 // 名前空間の判断が必要なとき
    58                 if( this->importedNamespaces.IsImported( baseNamespaceScopes )
    59                     || baseNamespaceScopes.IsLiving() ){
    60                     // Using指定があるとき
    61                     // または
    62                     // 指定された名前空間が現在の名前空間スコープと同一のとき
    63                     return true;
    64                 }
    65             }
    66             else{
    67                 return true;
    68             }
    69         }
    70 
    71         return false;
    72     }
    7324};
    7425
    75 static Compiler compiler;
     26extern Compiler compiler;
Note: See TracChangeset for help on using the changeset viewer.