Changeset 192 in dev for trunk/jenga/include


Ignore:
Timestamp:
Jun 26, 2007, 5:04:29 AM (17 years ago)
Author:
dai_9181
Message:
 
Location:
trunk/jenga/include/smoothie
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/jenga/include/smoothie/Class.h

    r190 r192  
    321321class Classes
    322322{
     323protected:
    323324    int GetHashCode(const char *name) const;
    324325    void DestroyClass(CClass *pobj_c);
     
    331332
    332333    const CClass *Find( const string &fullName ) const;
    333     const CClass *Find( const NamespaceScopes &namespaceScopes, const string &name ) const;
     334    virtual const CClass *Find( const NamespaceScopes &namespaceScopes, const string &name ) const = 0;
    334335
    335336    virtual CClass *Create( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name) = 0;
  • trunk/jenga/include/smoothie/Namespace.h

    r170 r192  
    7070    }
    7171
    72     bool IsImported() const;
    73 
    7472    bool IsLiving() const;
    7573
     
    8280    bool IsCoverd( const string &name ) const;
    8381    bool IsCoverd( const NamespaceScopes &namespaceScopes ) const;
    84 
    85     // 指定された名前空間が同一エリアと見なされるかどうかをチェック
    86     static bool IsSameArea( const NamespaceScopes &baseNamespaceScopes, const NamespaceScopes &entryNamespaceScopes ){
    87         if( entryNamespaceScopes.size() ){
    88             if( baseNamespaceScopes.IsCoverd( entryNamespaceScopes ) ){
    89                 // 包括しているときは同一と見なす
    90                 return true;
    91             }
    92         }
    93         else{
    94             if( baseNamespaceScopes.size() ){
    95                 // 名前空間の判断が必要なとき
    96                 if( baseNamespaceScopes.IsImported()
    97                     || baseNamespaceScopes.IsLiving() ){
    98                     // Using指定があるとき
    99                     // または
    100                     // 指定された名前空間が現在の名前空間スコープと同一のとき
    101                     return true;
    102                 }
    103             }
    104             else{
    105                 return true;
    106             }
    107         }
    108 
    109         return false;
    110     }
    11182};
    11283
     
    12899        return IsExist( NamespaceScopes( namespaceStr ) );
    129100    }
     101
     102    bool IsImported( const NamespaceScopes &namespaceScopes ) const
     103    {
     104        const NamespaceScopesCollection &namespaceScopesCollection = *this;
     105        BOOST_FOREACH( const NamespaceScopes &tempNamespaceScopes, namespaceScopesCollection )
     106        {
     107            if( namespaceScopes.IsEqual( tempNamespaceScopes ) )
     108            {
     109                return true;
     110            }
     111        }
     112        return false;
     113    }
     114
    130115    void SplitNamespace( const char *fullName, char *namespaceStr, char *simpleName ) const;
    131 
    132     bool Imports( const string &namespaceStr );
    133116
    134117    static bool CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection );
  • trunk/jenga/include/smoothie/ObjectModule.h

    r190 r192  
    11#pragma once
    22
    3 #include "TypeDef.h"
    43#include "Namespace.h"
    54#include "Procedure.h"
     
    2423    }
    2524
    26     // 名前空間
    27     NamespaceScopesCollection namespaceScopesCollection;
    28 
    2925    // クラス
    3026    virtual Classes &GetClasses() = 0;
    3127    virtual void SetClasses( Classes *pClasses ) = 0;
    3228    virtual bool AutoWrite( const std::string &filePath ) = 0;
    33 
    34     // TypeDef
    35     TypeDefCollection typeDefs;
    3629
    3730    // 関数ポインタ
     
    4033        return *pProcPointers;
    4134    }
    42 
    43     // blittable型
    44     BlittableTypes blittableTypes;
    4535
    4636    // XMLシリアライズ用
  • trunk/jenga/include/smoothie/Procedure.h

    r181 r192  
    281281    ~DllProc(){}
    282282
    283     bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
     283    virtual bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const = 0;
    284284    bool IsEqualSymbol( const string &name ) const;
    285285
  • trunk/jenga/include/smoothie/Prototype.h

    r190 r192  
    5151
    5252    // シンボル比較
    53     bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
     53    virtual bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const = 0;
    5454    bool IsEqualSymbol( const Prototype &prototype ) const;
    5555    bool IsEqualSymbol( const string &name ) const;
  • trunk/jenga/include/smoothie/Smoothie.h

    r190 r192  
    1717        Smoothie::isUnicode = isUnicode;
    1818    }
    19 
    20     static Meta &GetMeta();
    2119
    2220    class Lexical{
  • trunk/jenga/include/smoothie/Type.h

    r173 r192  
    5959    void SetIndex( LONG_PTR index ){
    6060        this->index = index;
     61    }
     62    void SetClassPtr( const CClass *pClass )
     63    {
     64        this->pClass = pClass;
    6165    }
    6266    void SetNull(){
     
    130134    }
    131135
    132     static Type String();
    133 
    134136
    135137private:
     
    138140public:
    139141    static bool StringToBasicType( const std::string &typeName, int &basicType );
    140     static bool StringToType( const std::string &typeName, Type &type );
     142    static const char *Type::BasicTypeToCharPtr( const Type &type );
    141143    static int GetBasicTypeFromSimpleName( const char *variable );
    142144};
  • trunk/jenga/include/smoothie/Variable.h

    r173 r192  
    5252    ~Variable(){}
    5353
     54    const NamespaceScopes &GetNamespaceScopes() const
     55    {
     56        return namespaceScopes;
     57    }
     58
    5459    void SetArray( const int *pSubScripts ){
    5560        isArray = true;
     
    6267    }
    6368
    64     bool IsEqualSymbol( const Symbol &symbol, bool isSupportStaticMember = true ) const;
     69    virtual bool IsEqualSymbol( const Symbol &symbol, bool isSupportStaticMember = true ) const = 0;
    6570
    6671    void ConstOff(){
Note: See TracChangeset for help on using the changeset viewer.