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


Ignore:
Timestamp:
Mar 19, 2012, 1:59:48 AM (12 years ago)
Author:
イグトランス (egtra)
Message:

egtraブランチの内容をマージ。

Location:
trunk
Files:
1 deleted
48 edited
9 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ab5.0/abdev

    • Property svn:ignore set to
      *.opensdf
      *.sdf
      *.suo
      *.user
      int
      ipch
      out
  • trunk/ab5.0/abdev/ab_common/include/BasicFixed.h

    r601 r828  
    129129
    130130//オブジェクト指向エスケープシーケンス
    131 #define ESC_CLASS           (char)0xA0
    132 #define ESC_ENDCLASS        (char)0xA1
    133 #define ESC_ABSTRACT        (char)0xA2
    134 #define ESC_VIRTUAL         (char)0xA3
    135 #define ESC_OVERRIDE        (char)0xA4
    136 #define ESC_INHERITS        (char)0xA5
    137 #define ESC_ENUM            (char)0xA6
    138 #define ESC_ENDENUM         (char)0xA7
    139 #define ESC_NEW             (char)0xA8
    140 #define ESC_INTERFACE       (char)0xA9
    141 #define ESC_ENDINTERFACE    (char)0xAA
    142 #define ESC_DELEGATE        (char)0xAB
    143 #define ESC_IMPLEMENTS      (char)0xAC
    144 #define ESC_SYSTEM_STATIC_NEW   (char)0xAD
     131#define ESC_CLASS           '\xA0'
     132#define ESC_ENDCLASS        '\xA1'
     133#define ESC_ABSTRACT        '\xA2'
     134#define ESC_VIRTUAL         '\xA3'
     135#define ESC_OVERRIDE        '\xA4'
     136#define ESC_INHERITS        '\xA5'
     137#define ESC_ENUM            '\xA6'
     138#define ESC_ENDENUM         '\xA7'
     139#define ESC_NEW             '\xA8'
     140#define ESC_INTERFACE       '\xA9'
     141#define ESC_ENDINTERFACE    '\xAA'
     142#define ESC_DELEGATE        '\xAB'
     143#define ESC_IMPLEMENTS      '\xAC'
     144#define ESC_SYSTEM_STATIC_NEW   '\xAD'
  • trunk/ab5.0/abdev/ab_common/include/Environment.h

    r773 r828  
    5050        Environment::isRemoveExternal = isRemoveExternalMark;
    5151    }
     52
     53private:
     54    Environment();
     55    Environment(Environment const&);
     56    Environment& operator =(Environment const&);
     57    ~Environment();
    5258};
    5359
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Class.h

    r750 r828  
    2828    {
    2929    }
     30
     31private:
     32    ClassPrototype(ClassPrototype const&);
     33    ClassPrototype& operator =(ClassPrototype const&);
    3034};
    3135
     
    497501
    498502    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
     503
     504private:
     505    CClass(CClass const&);
     506    CClass& operator =(CClass const&);
    499507};
    500508
     
    528536    const CClass *GetObjectClassPtr() const;
    529537    const CClass *GetInterfaceInfoClassPtr() const;
     538
     539private:
     540    Classes(Classes const&);
     541    Classes& operator =(Classes const&);
    530542};
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h

    r647 r828  
    4343    {
    4444    }
     45private:
    4546    CConst()
     47        : RelationalObjectModuleItem()
     48        , type()
     49        , i64data()
    4650    {
    4751    }
     52public:
    4853    ~CConst()
    4954    {
     
    6671
    6772    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
     73
     74private:
     75    CConst(CConst const&);
     76    CConst& operator =(CConst const&);
    6877};
    6978class Consts : public Jenga::Common::Hashmap<CConst>
     
    8190
    8291public:
     92    Consts() {}
    8393
    8494    void Add( const Symbol &symbol, _int64 i64data, const Type &type );
     
    93103    double GetDoubleData( const Symbol &symbol );
    94104    bool IsStringPtr( const Symbol &symbol, bool isUnicode );
     105
     106private:
     107    Consts(Consts const&);
     108    Consts& operator =(Consts const&);
    95109};
    96110
     
    153167
    154168    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
     169
     170private:
     171    ConstMacro(ConstMacro const&);
     172    ConstMacro& operator =(ConstMacro const&);
    155173};
    156174class ConstMacros
     
    169187
    170188public:
     189    ConstMacros() {}
     190
    171191    bool Add( const Symbol &symbol, const char *parameterStr );
    172192    ConstMacro *Find( const Symbol &name );
     193
     194private:
     195    ConstMacros(ConstMacros const&);
     196    ConstMacros& operator =(ConstMacros const&);
    173197};
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Delegate.h

    r640 r828  
    9696
    9797    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
     98
     99private:
     100    Delegate(Delegate const&);
     101    Delegate& operator =(Delegate const&);
    98102};
    99103typedef Jenga::Common::Hashmap<Delegate> Delegates;
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Interface.h

    r728 r828  
    1717
    1818public:
    19     DynamicMethodsPrototype(){}
    20     DynamicMethodsPrototype( const DynamicMethodsPrototype &dynamicMethodsPrototype )
    21         : dynamicMethods( dynamicMethodsPrototype.dynamicMethods )
     19    DynamicMethodsPrototype() {}
     20    DynamicMethodsPrototype(DynamicMethodsPrototype&& dynamicMethodsPrototype)
     21        : dynamicMethods(std::move(dynamicMethodsPrototype.dynamicMethods))
    2222    {
    2323    }
     24    DynamicMethodsPrototype(const DynamicMethodsPrototype &dynamicMethodsPrototype)
     25        : dynamicMethods(dynamicMethodsPrototype.dynamicMethods)
     26    {
     27    }
     28
     29    DynamicMethodsPrototype& operator =(DynamicMethodsPrototype&& y)
     30    {
     31        dynamicMethods = std::move(y.dynamicMethods);
     32        return *this;
     33    }
     34
     35    DynamicMethodsPrototype& operator =(DynamicMethodsPrototype const& y)
     36    {
     37        return *this = std::move(DynamicMethodsPrototype(y));
     38    }
     39
    2440    ~DynamicMethodsPrototype(){}
    2541
     
    6278public:
    6379    Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters );
     80    Interface(Interface&& objInterface)
     81        : DynamicMethodsPrototype(std::move(objInterface))
     82        , pInterfaceClass(std::move(objInterface.pInterfaceClass))
     83        , vtblOffset(std::move(objInterface.vtblOffset))
     84    {
     85    }
    6486    Interface( const Interface &objInterface )
    6587        : DynamicMethodsPrototype( objInterface )
     
    7294        , vtblOffset( NULL )
    7395    {
     96    }
     97
     98    Interface& operator =(Interface&& y)
     99    {
     100        DynamicMethodsPrototype::operator =(std::move(y));
     101        pInterfaceClass = std::move(y.pInterfaceClass);
     102        vtblOffset = std::move(y.vtblOffset);
     103        return *this;
     104    }
     105
     106    Interface& operator =(Interface const& y)
     107    {
     108        return *this = std::move(Interface(y));
    74109    }
    75110
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Meta.h

    r640 r828  
    163163
    164164    void Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
     165
     166private:
     167    Meta(Meta const&);
     168    Meta& operator =(Meta const&);
    165169};
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Method.h

    r640 r828  
    2525    {
    2626    }
     27
    2728    CMethod()
    28     {
    29     }
    30 
     29        : MemberPrototype()
     30        , pUserProc()
     31    {
     32    }
     33
     34protected:
     35    CMethod(CMethod const& y)
     36        : MemberPrototype(y)
     37        , pUserProc(y.pUserProc)
     38    {
     39    }
     40
     41public:
    3142    const UserProc &GetUserProc() const
    3243    {
     
    5061
    5162    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
     63
     64private:
     65    CMethod& operator =(CMethod const&);
    5266};
    5367
     
    103117    {
    104118    }
    105     DynamicMethod( const CMethod &method )
     119    explicit DynamicMethod( const CMethod &method )
    106120        : CMethod( &method.GetUserProc(), method.GetAccessibility() )
    107121        , isAbstract( method.IsAbstract() )
     
    116130    }
    117131
     132    DynamicMethod(DynamicMethod&& y)
     133        : CMethod(std::move(y))
     134        , isAbstract(std::move(y.isAbstract))
     135        , isVirtual(std::move(y.isVirtual))
     136        , isConst(std::move(y.isConst))
     137        , pInheritsClass(std::move(y.pInheritsClass))
     138        , isNotUse(std::move(y.isNotUse))
     139    {
     140    }
     141
     142    DynamicMethod(DynamicMethod const& y)
     143        : CMethod(y)
     144        , isAbstract(y.isAbstract)
     145        , isVirtual(y.isVirtual)
     146        , isConst(y.isConst)
     147        , pInheritsClass(y.pInheritsClass)
     148        , isNotUse(y.isNotUse)
     149    {
     150    }
     151
     152    DynamicMethod& operator =(DynamicMethod const&);
     153
    118154    DynamicMethod::OverrideResult::EnumType Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier );
    119155
     
    161197    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    162198};
    163 BOOST_CLASS_EXPORT( DynamicMethod );
     199BOOST_CLASS_EXPORT_KEY( DynamicMethod );
    164200class StaticMethod : public CMethod
    165201{
     
    182218    }
    183219
     220    // ムーブコンストラクタ
     221    StaticMethod(StaticMethod&& y);
     222
    184223    // コピーコンストラクタ
    185224    StaticMethod( const StaticMethod &staticMethod );
     
    237276    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    238277};
    239 BOOST_CLASS_EXPORT( StaticMethod );
     278BOOST_CLASS_EXPORT_KEY( StaticMethod );
    240279
    241280class Methods : public std::vector<CMethod *>
     
    255294    Methods();
    256295
     296    // ムーブコンストラクタ
     297    Methods(Methods&& methods);
     298
    257299    // コピーコンストラクタ
    258     Methods( const Methods &methods );
     300    Methods(const Methods &methods);
     301
     302    Methods& operator =(Methods&& methods)
     303    {
     304        std::vector<CMethod *>::operator =(std::move(methods));
     305        return *this;
     306    }
     307
     308    Methods& operator =(const Methods &methods)
     309    {
     310        return *this = Methods(methods);
     311    }
    259312
    260313    // デストラクタ
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Namespace.h

    r750 r828  
    77class NamespaceScopes : public std::vector<std::string>
    88{
     9    typedef std::vector<std::string> Base;
    910    // XMLシリアライズ用
    1011private:
     
    1718
    1819public:
    19     NamespaceScopes(){}
     20    NamespaceScopes() {}
     21    NamespaceScopes(NamespaceScopes const& y)
     22        : Base(y)
     23    {
     24    }
     25    NamespaceScopes(NamespaceScopes&& y)
     26        : Base(std::move(y))
     27    {
     28    }
    2029    NamespaceScopes( const std::string &namespaceStr );
    2130    NamespaceScopes( NamespaceScopes::const_iterator first, NamespaceScopes::const_iterator last )
    22         : std::vector<std::string>( first, last )
     31        : Base(first, last)
    2332    {
    2433    }
    2534    ~NamespaceScopes(){}
    2635
    27     NamespaceScopes operator+ ( const NamespaceScopes &namespaceScopes ) const;
    28 
    2936    void append( const NamespaceScopes &namespaceScopes )
    3037    {
    3138        insert( end(), namespaceScopes.begin(), namespaceScopes.end() );
     39    }
     40
     41    NamespaceScopes& operator +=(const NamespaceScopes &namespaceScopes)
     42    {
     43        append(namespaceScopes);
     44        return *this;
    3245    }
    3346
     
    7790};
    7891
     92NamespaceScopes operator +(const NamespaceScopes &lhs, const NamespaceScopes &rhs);
     93
    7994inline bool operator ==( const NamespaceScopes &lhs, const NamespaceScopes &rhs )
    8095{
     
    8499class NamespaceScopesCollection : public std::vector<NamespaceScopes>
    85100{
     101    typedef std::vector<NamespaceScopes> Base;
    86102    // XMLシリアライズ用
    87103private:
     
    93109
    94110public:
     111    NamespaceScopesCollection() : Base() {}
     112    NamespaceScopesCollection(NamespaceScopesCollection&& y) : Base(std::move(y)) {}
     113    NamespaceScopesCollection(NamespaceScopesCollection const& y) : Base(y) {}
     114    NamespaceScopesCollection& operator =(NamespaceScopesCollection&& y)
     115    {
     116        Base::operator =(std::move(y));
     117        return *this;
     118    }
     119    NamespaceScopesCollection& operator =(NamespaceScopesCollection const& y)
     120    {
     121        return operator =(NamespaceScopesCollection(y));
     122    }
    95123    bool IsExist( const NamespaceScopes &namespaceScopes ) const
    96124    {
  • trunk/ab5.0/abdev/ab_common/include/Lexical/NamespaceSupporter.h

    r670 r828  
    6565    // 指定された名前空間が同一エリアと見なされるかどうかをチェック
    6666    bool IsSameAreaNamespace( const NamespaceScopes &baseNamespaceScopes, const NamespaceScopes &entryNamespaceScopes ) const;
     67
     68private:
     69    NamespaceSupporter(NamespaceSupporter const&);
     70    NamespaceSupporter& operator =(NamespaceSupporter const&);
    6771};
    6872
  • trunk/ab5.0/abdev/ab_common/include/Lexical/NativeCode.h

    r641 r828  
    9797        }
    9898    }
     99    Schedule(Schedule&& y)
     100        : type(std::move(y.type))
     101        , offset(std::move(y.offset))
     102        , lpValue(std::move(y.lpValue))
     103    {
     104    }
     105    Schedule(Schedule const& y)
     106        : type(y.type)
     107        , offset(y.offset)
     108        , lpValue(y.lpValue)
     109    {
     110    }
     111    Schedule& operator =(Schedule&& y)
     112    {
     113        type = std::move(y.type);
     114        offset = std::move(y.offset);
     115        lpValue = std::move(y.lpValue);
     116        return *this;
     117    }
     118    Schedule& operator =(Schedule const& y)
     119    {
     120        return *this = std::move(Schedule(y));
     121    }
    99122    ~Schedule()
    100123    {
     
    151174    {
    152175    }
     176    SourceLine(SourceLine const& y)
     177        : nativeCodePos(y.nativeCodePos)
     178        , codeType(y.codeType)
     179        , sourceCodePosition(y.sourceCodePosition)
     180    {
     181    }
     182    SourceLine(SourceLine&& y)
     183        : nativeCodePos(std::move(y.nativeCodePos))
     184        , codeType(std::move(y.codeType))
     185        , sourceCodePosition(std::move(y.sourceCodePosition))
     186    {
     187    }
     188    SourceLine& operator =(SourceLine&& y)
     189    {
     190        nativeCodePos = std::move(y.nativeCodePos);
     191        codeType = std::move(y.codeType);
     192        sourceCodePosition = std::move(y.sourceCodePosition);
     193        return *this;
     194    }
     195    SourceLine& operator =(SourceLine const& y)
     196    {
     197        return *this = std::move(SourceLine(y));
     198    }
    153199
    154200    long GetNativeCodePos() const
  • trunk/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h

    r640 r828  
    4343
    4444public:
     45    ObjectModule() {}
    4546
    4647    const std::string &GetName() const
     
    7576    bool ReadString( const std::string &str );
    7677    bool WriteString( std::string &str ) const;
     78
     79private:
     80    ObjectModule(ObjectModule const&);
     81    ObjectModule& operator =(ObjectModule const&);
    7782};
    7883typedef std::vector<ObjectModule *> ObjectModules;
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Parameter.h

    r632 r828  
    2929    Parameter( const Parameter &param, const Type &type );
    3030    Parameter( const Parameter &param );
     31    Parameter(Parameter&& param)
     32        : varName(std::move(param.varName))
     33        , isRef(std::move(param.isRef))
     34        , isArray(std::move(param.isArray))
     35        , subscripts(std::move(param.subscripts))
     36        , initValue(std::move(param.initValue)) {}
    3137    Parameter();
    3238    ~Parameter();
    3339
     40    Parameter& operator =(Parameter&& y)
     41    {
     42        varName = std::move(y.varName);
     43        isRef = std::move(y.isRef);
     44        isArray = std::move(y.isArray);
     45        subscripts = std::move(y.subscripts);
     46        initValue = std::move(y.initValue);
     47        return *this;
     48    }
     49
     50    Parameter& operator =(Parameter const& y)
     51    {
     52        return *this = std::move(Parameter(y));
     53    }
     54   
    3455    void SetArray( const Subscripts &subscripts ){
    3556        isArray = true;
     
    4667        return isRef;
    4768    }
    48     bool IsArray(){
     69    bool IsArray() const
     70    {
    4971        return isArray;
    5072    }
     
    7698
    7799public:
     100    Parameters() : std::vector<Parameter *>() {}
     101    Parameters(Parameters&& y) : std::vector<Parameter *>(std::move(y)) {}
     102    Parameters(Parameters const& y) : std::vector<Parameter *>(y) {}
     103
     104    Parameters& operator =(Parameters&& y)
     105    {
     106        std::vector<Parameter *>::operator =(std::move(y));
     107        return *this;
     108    }
     109
     110    Parameters& operator =(Parameters const& y)
     111    {
     112        return *this = std::move(Parameters(y));
     113    }
    78114
    79115    bool Equals( const Parameters &params, bool isContravariant = false ) const;
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h

    r750 r828  
    5656    {
    5757    }
     58
     59    Procedure(Procedure const& y)
     60        : RelationalObjectModuleItem(y)
     61        , kind(y.kind)
     62        , isCdecl(y.isCdecl)
     63        , isUsing(y.isUsing)
     64        , params(y.params)
     65        , returnType(y.returnType)
     66        , sourceCodePosition(y.sourceCodePosition)
     67    {
     68    }
     69
     70    Procedure(Procedure&& y)
     71        : RelationalObjectModuleItem(std::move(y))
     72        , kind(std::move(y.kind))
     73        , isCdecl(std::move(y.isCdecl))
     74        , isUsing(std::move(y.isUsing))
     75        , params(std::move(y.params))
     76        , returnType(std::move(y.returnType))
     77        , sourceCodePosition(std::move(y.sourceCodePosition))
     78    {
     79    }
     80
     81    Procedure& operator =(Procedure&& y)
     82    {
     83        RelationalObjectModuleItem::operator =(std::move(y));
     84        kind = std::move(y.kind);
     85        isCdecl = std::move(y.isCdecl);
     86        isUsing = std::move(y.isUsing);
     87        params = std::move(y.params);
     88        returnType = std::move(y.returnType);
     89        sourceCodePosition = std::move(y.sourceCodePosition);
     90        return *this;
     91    }
     92
     93    Procedure& operator =(Procedure const& y)
     94    {
     95        return *this = std::move(Procedure(y));
     96    }
     97
    5898    ~Procedure(){
    5999        foreach( Parameter *pParam, params ){
     
    393433
    394434    static const UserProc *pGlobalProc;
     435
     436private:
     437    UserProc(UserProc const&);
     438    UserProc& operator =(UserProc const&);
    395439};
    396440
     
    418462
    419463    void EnumGlobalProcs( const char *simpleName, const Symbol &localSymbol, std::vector<const UserProc *> &subs );
     464
     465private:
     466    UserProcs(UserProcs const&);
     467    UserProcs& operator =(UserProcs const&);
    420468};
    421469
     
    499547
    500548    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
     549
     550private:
     551    DllProc(DllProc const&);
     552    DllProc& operator =(DllProc const&);
    501553};
    502554class DllProcs : public Jenga::Common::Hashmap<DllProc>
    503555{
     556public:
     557    DllProcs() {}
     558
    504559    // XMLシリアライズ用
    505560private:
     
    512567            boost::serialization::base_object<Jenga::Common::Hashmap<DllProc>>(*this));
    513568    }
     569
     570    DllProcs(DllProcs const&);
     571    DllProcs& operator =(DllProcs const&);
    514572};
    515573
     
    540598
    541599    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
     600
     601    ProcPointer(ProcPointer const&);
     602    ProcPointer& operator =(ProcPointer const&);
    542603};
    543604
     
    569630        clear();
    570631    }
     632
     633    ProcPointers(ProcPointers const&);
     634    ProcPointers& operator =(ProcPointers const&);
    571635};
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Prototype.h

    r637 r828  
    6161        isUsing = true;
    6262    }
     63
     64private:
     65    Prototype(Prototype const&);
     66    Prototype& operator =(Prototype const&);
    6367};
    6468
     
    8084    {
    8185    }
     86
    8287    MemberPrototype()
    8388        : accessibility( Prototype::None )
     
    8590    }
    8691
     92protected:
     93    MemberPrototype(MemberPrototype const& y)
     94        : accessibility(y.accessibility)
     95    {
     96    }
     97
     98public:
    8799    Prototype::Accessibility GetAccessibility() const
    88100    {
     
    109121        return ( accessibility == Prototype::Public );
    110122    }
     123
     124private:
     125    MemberPrototype& operator =(MemberPrototype const &);
    111126};
    112127
  • trunk/ab5.0/abdev/ab_common/include/Lexical/RelationalObjectModuleItem.h

    r640 r828  
    2020    }
    2121
    22 public:
     22protected:
     23    RelationalObjectModuleItem(RelationalObjectModuleItem&& relationalObjectModuleItem)
     24        : Symbol(std::move(relationalObjectModuleItem))
     25        , relationalObjectModuleIndex(std::move(relationalObjectModuleItem.relationalObjectModuleIndex))
     26        , isNeedResolve(std::move(false))
     27    {
     28    }
     29
    2330    RelationalObjectModuleItem( const RelationalObjectModuleItem &relationalObjectModuleItem )
    2431        : Symbol( relationalObjectModuleItem )
     
    2734    {
    2835    }
     36
    2937    RelationalObjectModuleItem( const Symbol &symbol )
    3038        : Symbol( symbol )
     
    3341    {
    3442    }
     43
    3544    RelationalObjectModuleItem()
    3645        : relationalObjectModuleIndex( -1 )
     
    3948    }
    4049
     50    RelationalObjectModuleItem& operator =(RelationalObjectModuleItem&& y)
     51    {
     52        Symbol::operator =(std::move(y));
     53        relationalObjectModuleIndex = std::move(y.relationalObjectModuleIndex);
     54        isNeedResolve = std::move(y.isNeedResolve);
     55        return *this;
     56    }
     57
     58    RelationalObjectModuleItem& operator =(RelationalObjectModuleItem const& y)
     59    {
     60        Symbol::operator =(y);
     61        relationalObjectModuleIndex = y.relationalObjectModuleIndex;
     62        isNeedResolve = y.isNeedResolve;
     63        return *this;
     64    }
     65
     66public:
    4167    int GetRelationalObjectModuleIndex() const
    4268    {
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Resolver.h

    r640 r828  
    1515    }
    1616
     17    ResolveError(ResolveError&& y)
     18        : relationalObjectModuleIndex(std::move(y.relationalObjectModuleIndex))
     19        , targetItemName(std::move(y.targetItemName))
     20    {
     21    }
     22
     23    ResolveError(ResolveError const& y)
     24        : relationalObjectModuleIndex(y.relationalObjectModuleIndex)
     25        , targetItemName(y.targetItemName)
     26    {
     27    }
     28
     29    ResolveError& operator =(ResolveError&& y)
     30    {
     31        relationalObjectModuleIndex = std::move(y.relationalObjectModuleIndex);
     32        targetItemName = std::move(y.targetItemName);
     33        return *this;
     34    }
     35
     36    ResolveError& operator =(ResolveError const& y)
     37    {
     38        return *this = std::move(ResolveError(y));
     39    }
     40
    1741    int GetRelationalObjectModuleIndex() const
    1842    {
     
    2852{
    2953public:
     54    ResolveErrors() {}
     55    ResolveErrors(ResolveErrors&& y) : std::vector<ResolveError>(std::move(y)) {}
     56    ResolveErrors(ResolveErrors const& y) : std::vector<ResolveError>(y) {}
     57    ResolveErrors& operator =(ResolveErrors&& y)
     58    {
     59        std::vector<ResolveError>::operator =(std::move(y));
     60        return *this;
     61    }
     62    ResolveErrors& operator =(ResolveErrors const& y)
     63    {
     64        return *this = std::move(ResolveErrors(y));
     65    }
     66
    3067    void Add( const ResolveError &resolveError )
    3168    {
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Source.h

    r739 r828  
    2121    {
    2222    }
     23    IncludedFilesRelation(IncludedFilesRelation const& y)
     24        : filePaths(y.filePaths)
     25        , lineFileNumbers(y.lineFileNumbers)
     26    {
     27    }
     28    IncludedFilesRelation(IncludedFilesRelation&& y)
     29        : filePaths(std::move(y.filePaths))
     30        , lineFileNumbers(std::move(y.lineFileNumbers))
     31    {
     32    }
    2333    ~IncludedFilesRelation()
    2434    {
     35    }
     36    IncludedFilesRelation& operator =(IncludedFilesRelation&& y)
     37    {
     38        filePaths = std::move(y.filePaths);
     39        lineFileNumbers = std::move(y.lineFileNumbers);
     40        return *this;
     41    }
     42
     43    IncludedFilesRelation& operator =(IncludedFilesRelation const& y)
     44    {
     45        return *this = std::move(IncludedFilesRelation(y));
    2546    }
    2647
     
    7697        buffer[length] = 0;
    7798    }
     99    Text(Text&& text)
     100        : length( text.length )
     101    {
     102        buffer = text.buffer;
     103        text.buffer = static_cast<char*>(calloc(1, 1));
     104        text.length = 0;
     105    }
     106    Text& operator =(Text&& y)
     107    {
     108        SwapImpl(*this, y);
     109        return *this;
     110    }
     111    Text& operator =(Text const& y)
     112    {
     113        return *this = std::move(Text(y));
     114    }
    78115    ~Text(){
    79116        free( buffer );
     
    100137    static void SlideString(char *buffer, int slide){
    101138        memmove(buffer+slide, buffer, strlen(buffer)+1);
     139    }
     140
     141protected:
     142    static void SwapImpl(Text& lhs, Text& rhs)
     143    {
     144        std::swap(lhs.buffer, rhs.buffer);
     145        std::swap(lhs.length, rhs.length);
    102146    }
    103147};
     
    192236    {
    193237    }
     238    BasicSource(BasicSource&& basicSource)
     239        : Text(std::move(basicSource))
     240        , includedFilesRelation(std::move(basicSource.includedFilesRelation))
     241    {
     242    }
    194243    BasicSource( const std::string &source )
    195244    {
     
    230279    bool GetLineInfo( int sourceCodePos, int &line, std::string &fileName ) const;
    231280
    232     void operator = ( const BasicSource &source ){
     281    BasicSource& operator =(const BasicSource &source)
     282    {
    233283        Realloc( source.length );
    234284        strcpy( buffer, source.buffer );
     285        return *this;
     286    }
     287    BasicSource& operator =(BasicSource&& source)
     288    {
     289        Text::SwapImpl(*this, source);
     290        return *this;
    235291    }
    236292
     
    262318        ar & boost::serialization::make_nvp("vector_BasicSource", boost::serialization::base_object<std::vector<BasicSource>>(*this));
    263319    }
     320
     321public:
     322    BasicSources() {}
     323    BasicSources(BasicSources&& y) : std::vector<BasicSource>(std::move(y)) {}
     324    BasicSources(BasicSources const& y) : std::vector<BasicSource>(y) {}
     325    BasicSources operator =(BasicSources&& y)
     326    {
     327        std::vector<BasicSource>::operator =(std::move(y));
     328        return *this;
     329    }
     330    BasicSources operator =(BasicSources const& y)
     331    {
     332        return *this = std::move(BasicSources(y));
     333    }
    264334};
    265335
     
    289359    {
    290360    }
     361    SourceCodePosition(SourceCodePosition const& y)
     362        : relationalObjectModuleIndex(y.relationalObjectModuleIndex)
     363        , pos(y.pos)
     364    {
     365    }
     366
     367    SourceCodePosition& operator =(SourceCodePosition const& y)
     368    {
     369        relationalObjectModuleIndex = y.relationalObjectModuleIndex;
     370        pos = y.pos;
     371        return *this;
     372    }
    291373
    292374    int GetRelationalObjectModuleIndex() const;
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Symbol.h

    r637 r828  
    3838
    3939public:
    40     Symbol( const NamespaceScopes &namespaceScopes, const std::string &name )
    41         : namespaceScopes( namespaceScopes )
    42         , name( name )
     40    Symbol(NamespaceScopes namespaceScopes, std::string name)
     41        : namespaceScopes(std::move(namespaceScopes))
     42        , name(std::move(name))
    4343    {
    4444    }
    45     Symbol( const Symbol &symbol )
    46         : namespaceScopes( symbol.namespaceScopes )
    47         , name( symbol.name )
     45    Symbol(const Symbol &symbol)
     46        : namespaceScopes(symbol.namespaceScopes)
     47        , name(symbol.name)
     48    {
     49    }
     50    Symbol(Symbol&& symbol)
     51        : namespaceScopes(std::move(symbol.namespaceScopes))
     52        , name(std::move(symbol.name))
    4853    {
    4954    }
    5055    Symbol()
    5156    {
     57    }
     58    Symbol& operator =(Symbol&& symbol)
     59    {
     60        namespaceScopes = std::move(symbol.namespaceScopes);
     61        name = std::move(symbol.name);
     62        return *this;
     63    }
     64    Symbol& operator =(Symbol const& symbol)
     65    {
     66        return *this = Symbol(symbol);
    5267    }
    5368
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Template.h

    r640 r828  
    4848
    4949    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
     50
     51private:
     52    ExpandedTemplateClass(ExpandedTemplateClass const&);
     53    ExpandedTemplateClass& operator =(ExpandedTemplateClass const&);
    5054};
    5155
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Type.h

    r750 r828  
     1#include <boost/foreach.hpp>
    12#pragma once
    23
     
    6667      index( (LONG_PTR)&objClass ){}
    6768
    68     Type( const Type &type )
    69         : basicType( type.basicType )
    70         , index( type.index )
    71         , actualGenericTypes( type.actualGenericTypes )
    72         , formalTypeName( type.formalTypeName )
    73         , formalTypeIndex( type.formalTypeIndex )
     69    Type(Type&& type)
     70        : basicType(std::move(type.basicType))
     71        , index(std::move(type.index))
     72        , actualGenericTypes(std::move(type.actualGenericTypes))
     73        , formalTypeName(std::move(type.formalTypeName))
     74        , formalTypeIndex(std::move(type.formalTypeIndex))
     75    {
     76    }
     77
     78    Type(Type const& type)
     79        : basicType(type.basicType)
     80        , index(type.index)
     81        , actualGenericTypes(type.actualGenericTypes)
     82        , formalTypeName(type.formalTypeName)
     83        , formalTypeIndex(type.formalTypeIndex)
    7484    {
    7585    }
     
    7787    ~Type();
    7888
    79     void operator= ( const Type &type )
    80     {
    81         basicType = type.basicType;
    82         index = type.index;
    83         actualGenericTypes = type.actualGenericTypes;
    84         formalTypeName = type.formalTypeName;
    85         formalTypeIndex = type.formalTypeIndex;
    86     }
    87 
    88     __inline int GetBasicType() const
     89    Type& operator =(Type&& type)
     90    {
     91        basicType = std::move(type.basicType);
     92        index = std::move(type.index);
     93        actualGenericTypes = std::move(type.actualGenericTypes);
     94        formalTypeName = std::move(type.formalTypeName);
     95        formalTypeIndex = std::move(type.formalTypeIndex);
     96        return *this;
     97    }
     98
     99    Type& operator =(Type const& type)
     100    {
     101        return *this = Type(type);
     102    }
     103
     104    int GetBasicType() const
    89105    {
    90106        return basicType;
     
    253269
    254270public:
     271    Types() {}
     272    Types(Types&& y) : std::vector<Type>(std::move(y)) {}
     273    Types(Types const& y) : std::vector<Type>(y) {}
     274
     275    Types& operator =(Types&& y)
     276    {
     277        std::vector<Type>::operator =(std::move(y));
     278        return *this;
     279    }
     280
     281    Types& operator =(Types const& y)
     282    {
     283        return *this = std::move(Types(y));
     284    }
     285
    255286    bool IsEquals( const Types &Types ) const;
    256287};
     
    281312
    282313public:
    283     GenericType( const std::string &name, const Type &type )
    284         : name( name )
    285         , type( type )
    286     {
    287     }
     314    GenericType( std::string name, Type type )
     315        : name(std::move(name))
     316        , type(std::move(type))
     317    {
     318    }
     319
    288320    GenericType()
    289321    {
    290322    }
     323
     324    GenericType(GenericType&& y)
     325        : name(std::move(y.name))
     326        , type(std::move(y.type))
     327    {
     328    }
     329
     330    GenericType(GenericType const& y)
     331        : name(y.name)
     332        , type(y.type)
     333    {
     334    }
     335
     336    GenericType& operator =(GenericType&& y)
     337    {
     338        name = std::move(y.name);
     339        type = std::move(y.type);
     340        return *this;
     341    }
     342
     343    GenericType& operator =(GenericType const& y)
     344    {
     345        return *this = std::move(GenericType(y));
     346    }
     347
    291348    ~GenericType()
    292349    {
     
    329386    {
    330387    }
     388
    331389    BlittableType()
    332     {
    333     }
     390        : basicType()
     391        , pClass()
     392    {
     393    }
     394
     395    BlittableType(BlittableType&& y)
     396        : basicType(std::move(y.basicType))
     397        , pClass(std::move(y.pClass))
     398    {
     399    }
     400
     401    BlittableType(BlittableType const& y)
     402        : basicType(y.basicType)
     403        , pClass(y.pClass)
     404    {
     405    }
     406
     407    BlittableType& operator =(BlittableType&& y)
     408    {
     409        basicType = std::move(y.basicType);
     410        pClass = std::move(y.pClass);
     411        return *this;
     412    }
     413
     414    BlittableType& operator =(BlittableType const& y)
     415    {
     416        return *this = std::move(BlittableType(y));
     417    }
     418
    334419    const Type &GetBasicType() const
    335420    {
     
    344429    virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
    345430};
     431
    346432class BlittableTypes : public std::vector<BlittableType>
    347433{
     
    358444
    359445public:
     446    BlittableTypes() {}
     447    BlittableTypes(BlittableTypes&& y) : std::vector<BlittableType>(std::move(y)) {}
     448    BlittableTypes(BlittableTypes const& y) : std::vector<BlittableType>(y) {}
     449    BlittableTypes& operator =(BlittableTypes&& y)
     450    {
     451        std::vector<BlittableType>::operator =(std::move(y));
     452        return *this;
     453    }
     454    BlittableTypes& operator =(BlittableTypes const& y)
     455    {
     456        return *this = std::move(BlittableTypes(y));
     457    }
     458
    360459    bool IsExist( Type type ) const
    361460    {
  • trunk/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h

    r640 r828  
    4242    }
    4343
     44    TypeDef(TypeDef&& y)
     45        : RelationalObjectModuleItem(std::move(y))
     46        , baseName(std::move(y.baseName))
     47        , baseType(std::move(y.baseType))
     48    {
     49    }
     50
     51    TypeDef(TypeDef const& y)
     52        : RelationalObjectModuleItem(y)
     53        , baseName(y.baseName)
     54        , baseType(y.baseType)
     55    {
     56    }
     57
     58    TypeDef& operator =(TypeDef&& y)
     59    {
     60        RelationalObjectModuleItem::operator =(std::move(y));
     61        baseName = std::move(y.baseName);
     62        baseType = std::move(y.baseType);
     63        return *this;
     64    }
     65
     66    TypeDef& operator =(TypeDef const& y)
     67    {
     68        return *this = std::move(TypeDef(y));
     69    }
     70
    4471    const std::string &GetBaseName() const
    4572    {
     
    6996public:
    7097    TypeDefCollection();
     98    TypeDefCollection(TypeDefCollection&& y) : std::vector<TypeDef>(std::move(y)) {}
     99    TypeDefCollection(TypeDefCollection const& y) : std::vector<TypeDef>(y) {}
     100    TypeDefCollection& operator =(TypeDefCollection&& y)
     101    {
     102        std::vector<TypeDef>::operator =(std::move(y));
     103        return *this;
     104    }
     105    TypeDefCollection& operator =(TypeDefCollection const& y)
     106    {
     107        return *this = std::move(TypeDefCollection(y));
     108    }
    71109    ~TypeDefCollection();
    72110
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Variable.h

    r677 r828  
    6464public:
    6565    Variable( const Symbol &symbol, const Type &type, bool isConst, bool isRef, const std::string &paramStrForConstructor, bool hasInitData );
     66    Variable(Variable&& var);
    6667    Variable( const Variable &var );
    6768    Variable();
     69    Variable& operator =(Variable&& y);
     70    Variable& operator =(Variable const& y)
     71    {
     72        return *this = std::move(Variable(y));
     73    }
    6874
    6975    void SetArray( const Subscripts &subscripts ){
  • trunk/ab5.0/abdev/ab_common/include/ResourceManager/ResourceManager.h

    r622 r828  
    1111    // IDEのみで使う
    1212    HTREEITEM hTreeItem;
     13
     14    ResourceItem()
     15        : idName()
     16        , filepath()
     17        , hTreeItem() {}
     18
     19    ResourceItem(ResourceItem&& y)
     20        : idName(std::move(y.idName))
     21        , filepath(std::move(y.filepath))
     22        , hTreeItem(std::move(y.hTreeItem)) {}
     23
     24    ResourceItem(ResourceItem const& y)
     25        : idName(y.idName)
     26        , filepath(y.filepath)
     27        , hTreeItem(y.hTreeItem) {}
     28
     29    ResourceItem& operator =(ResourceItem&& y)
     30    {
     31        idName = std::move(y.idName);
     32        filepath= std::move(y.filepath);
     33        hTreeItem = std::move(y.hTreeItem);
     34        return *this;
     35    }
     36
     37    ResourceItem& operator =(ResourceItem const& y)
     38    {
     39        return *this = std::move(ResourceItem(y));
     40    }
    1341};
     42
    1443typedef std::vector<ResourceItem> ResourceItems;
    1544
     
    1847{
    1948public:
     49    ResourceManager() {}
     50
    2051    void Clear();
    2152    bool Load( const std::string &resourceFilePath );
     
    2859    ResourceItems iconResources;
    2960    std::string manifestFilePath;
     61
     62private:
     63    ResourceManager(ResourceManager const&);
     64    ResourceManager operator =(ResourceManager const&);
    3065};
    3166
  • trunk/ab5.0/abdev/ab_common/include/libs.h

    r756 r828  
    1111#define lstrcmpiA _stricmp
    1212
     13#if 0
    1314extern "C"
    1415{
     
    2324#define malloc dlmalloc
    2425#define realloc dlrealloc
     26#endif
  • trunk/ab5.0/abdev/ab_common/src/Environment.cpp

    r773 r828  
    11#include "stdafx.h"
    22#include <uxtheme.h>
     3
     4DWORD const PROCESS_DEP_ENABLE = 0x00000001;
    35
    46std::string ActiveBasic::Common::Environment::rootPath;
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp

    r750 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24#include <algorithm>
    35#include <boost/checked_delete.hpp>
     
    777779
    778780    std::vector<const CClass *> classes;
    779     const CClass *pClass = GetHashArrayElement( symbol.GetName().c_str() );
    780     while( pClass )
    781     {
    782         if( pClass->IsEqualSymbol( symbol.GetNamespaceScopes(), symbol.GetName() ) ){
     781    foreach (auto pClass, GetHashArrayElement(symbol.GetName()))
     782    {
     783        if ( pClass->IsEqualSymbol(symbol.GetNamespaceScopes(), symbol.GetName()))
     784        {
    783785            //名前空間とクラス名が一致した
    784786            classes.push_back( pClass );
    785787        }
    786         pClass = pClass->GetChainNext();
    787788    }
    788789    if( classes.size() > 0 )
    789790    {
    790791        // 複数の名前空間の中に同一のクラス名が存在する場合があるので、アクセス可能で尚且つ階層が一番深いものをチョイスする
    791         pClass = classes.front();
     792        auto pClass = classes.front();
    792793
    793794        foreach( const CClass *pTempClass, classes )
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Const.cpp

    r700 r828  
    2929CConst *Consts::GetObjectPtr( const Symbol &symbol )
    3030{
    31     CConst *pConst = GetHashArrayElement( symbol.GetName().c_str() );
    32     while( pConst )
    33     {
    34         if( pConst->IsEqualSymbol( symbol ) )
    35         {
    36             break;
    37         }
    38         pConst = pConst->GetChainNext();
    39     }
    40 
    41     return pConst;
     31    auto c = GetHashArrayElement(symbol.GetName());
     32    auto it = std::find_if(c.begin(), c.end(),
     33        [&](CConst* t) {return t->IsEqualSymbol(symbol);});
     34    return it != c.end()
     35        ? *it
     36        : nullptr;
    4237}
    4338
     
    131126ConstMacro *ConstMacros::Find( const Symbol &symbol )
    132127{
    133     ConstMacro *pConstMacro = GetHashArrayElement( symbol.GetName().c_str() );
    134     while( pConstMacro )
    135     {
    136         if( pConstMacro->IsEqualSymbol( symbol ) )
    137         {
    138             break;
    139         }
    140         pConstMacro = pConstMacro->GetChainNext();
    141     }
    142 
    143     return pConstMacro;
     128    auto c = GetHashArrayElement(symbol.GetName());
     129    auto it = std::find_if(c.begin(), c.end(),
     130        [&](ConstMacro* t) {return t->IsEqualSymbol(symbol);});
     131    return it != c.end()
     132        ? *it
     133        : nullptr;
    144134}
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp

    r750 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35Interface::Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters )
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Member.cpp

    r640 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp

    r750 r828  
    3737{
    3838    // 名前空間
    39     BOOST_FOREACH( NamespaceScopes &namespaceScopes, meta.namespaceScopesCollection )
     39    foreach (NamespaceScopes const &namespaceScopes, meta.namespaceScopesCollection)
    4040    {
    4141        if( !this->namespaceScopesCollection.IsExist( namespaceScopes ) )
     
    4646
    4747    // 関数・メソッド
    48     meta.GetUserProcs().Iterator_Reset();
    49     while( meta.GetUserProcs().Iterator_HasNext() )
    50     {
    51         UserProc *pUserProc = meta.GetUserProcs().Iterator_GetNext();
     48    foreach (auto pUserProc, meta.GetUserProcs())
     49    {
    5250        if( pUserProc->IsExternal() )
    5351        {
     
    6563
    6664    // DLL関数
    67     meta.GetDllProcs().Iterator_Reset();
    68     while( meta.GetDllProcs().Iterator_HasNext() )
    69     {
    70         DllProc *pDllProc = meta.GetDllProcs().Iterator_GetNext();
     65    foreach (auto pDllProc, meta.GetDllProcs())
     66    {
    7167        if( pDllProc->IsExternal() )
    7268        {
     
    8177
    8278    // クラス
    83     meta.GetClasses().Iterator_Reset();
    84     while( meta.GetClasses().Iterator_HasNext() )
    85     {
    86         CClass *pClass = meta.GetClasses().Iterator_GetNext();
     79    foreach (auto pClass, meta.GetClasses())
     80    {
    8781        if( pClass->IsExternal() )
    8882        {
     
    132126
    133127    // グローバル定数
    134     meta.GetGlobalConsts().Iterator_Reset();
    135     while( meta.GetGlobalConsts().Iterator_HasNext() )
    136     {
    137         CConst *pConst = meta.GetGlobalConsts().Iterator_GetNext();
     128    foreach (auto pConst, meta.GetGlobalConsts())
     129    {
    138130        if( pConst->IsExternal() )
    139131        {
     
    148140
    149141    // グローバル定数マクロ
    150     meta.GetGlobalConstMacros().Iterator_Reset();
    151     while( meta.GetGlobalConstMacros().Iterator_HasNext() )
    152     {
    153         ConstMacro *pConstMacro = meta.GetGlobalConstMacros().Iterator_GetNext();
     142    foreach (auto pConstMacro, meta.GetGlobalConstMacros())
     143    {
    154144        if( pConstMacro->IsExternal() )
    155145        {
     
    200190
    201191    // デリゲート
    202     meta.GetDelegates().Iterator_Reset();
    203     while( meta.GetDelegates().Iterator_HasNext() )
    204     {
    205         Delegate *pDelegate = meta.GetDelegates().Iterator_GetNext();
     192    foreach (auto pDelegate, meta.GetDelegates())
     193    {
    206194        if( pDelegate->IsExternal() )
    207195        {
     
    218206const ::Delegate &Meta::ToDelegate( const CClass &_class )
    219207{
    220     const ::Delegate *dg = this->GetDelegates().GetHashArrayElement( _class.GetName().c_str() );
    221     while( dg )
    222     {
    223         if( dg->IsEqualSymbol( _class.GetNamespaceScopes(), _class.GetName() ) ){
     208    auto dg = this->GetDelegates().GetHashArrayElement(_class.GetName());
     209    foreach (auto t, dg)
     210    {
     211        if( t->IsEqualSymbol( _class.GetNamespaceScopes(), _class.GetName() ) ){
    224212            //名前空間とクラス名が一致した
    225             return *dg;
    226         }
    227         dg = dg->GetChainNext();
    228     }
    229 
    230     throw;
     213            return *t;
     214        }
     215    }
     216
     217    throw std::runtime_error("Meta::ToDelegate");
    231218}
    232219
     
    256243{
    257244    // 関数・メソッド
    258     this->GetUserProcs().Iterator_Init();
    259     this->GetUserProcs().Iterator_Reset();
    260     while( this->GetUserProcs().Iterator_HasNext() )
    261     {
    262         UserProc *pUserProc = this->GetUserProcs().Iterator_GetNext();
     245    foreach (auto pUserProc, this->GetUserProcs())
     246    {
    263247        pUserProc->Resolve( resolver, resolveErrors );
    264248    }
    265249
    266250    // DLL関数
    267     this->GetDllProcs().Iterator_Init();
    268     this->GetDllProcs().Iterator_Reset();
    269     while( this->GetDllProcs().Iterator_HasNext() )
    270     {
    271         DllProc *pDllProc = this->GetDllProcs().Iterator_GetNext();
     251    foreach (auto pDllProc, this->GetDllProcs())
     252    {
    272253        pDllProc->Resolve( resolver, resolveErrors );
    273254    }
    274255
    275256    // クラス
    276     this->GetClasses().Iterator_Init();
    277     this->GetClasses().Iterator_Reset();
    278     while( this->GetClasses().Iterator_HasNext() )
    279     {
    280         CClass *pClass = this->GetClasses().Iterator_GetNext();
     257    foreach (auto pClass, this->GetClasses())
     258    {
    281259        pClass->Resolve( resolver, resolveErrors );
    282260    }
     
    289267
    290268    // グローバル定数
    291     this->GetGlobalConsts().Iterator_Init();
    292     this->GetGlobalConsts().Iterator_Reset();
    293     while( this->GetGlobalConsts().Iterator_HasNext() )
    294     {
    295         CConst *pConst = this->GetGlobalConsts().Iterator_GetNext();
     269    foreach (auto pConst, this->GetGlobalConsts())
     270    {
    296271        pConst->Resolve( resolver, resolveErrors );
    297272    }
    298273
    299274    // グローバル定数マクロ
    300     this->GetGlobalConstMacros().Iterator_Init();
    301     this->GetGlobalConstMacros().Iterator_Reset();
    302     while( this->GetGlobalConstMacros().Iterator_HasNext() )
    303     {
    304         ConstMacro *pConstMacro = this->GetGlobalConstMacros().Iterator_GetNext();
     275    foreach (auto pConstMacro, this->GetGlobalConstMacros())
     276    {
    305277        pConstMacro->Resolve( resolver, resolveErrors );
    306278    }
     
    325297
    326298    // デリゲート
    327     this->GetDelegates().Iterator_Init();
    328     this->GetDelegates().Iterator_Reset();
    329     while( this->GetDelegates().Iterator_HasNext() )
    330     {
    331         Delegate *pDelegate = this->GetDelegates().Iterator_GetNext();
     299    foreach (auto pDelegate, this->GetDelegates())
     300    {
    332301        pDelegate->Resolve( resolver, resolveErrors );
    333302    }
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Method.cpp

    r750 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
     4#include <stdexcept>
    25
    36bool CMethod::Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors )
     
    7578{
    7679    // 静的メソッドがコピーコンストラトされることは想定しない
    77     throw;
     80    throw std::domain_error("静的メソッドのコピー構築に対応していない");
    7881}
    7982
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Namespace.cpp

    r736 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24#include <algorithm>
    35
     
    1618        std::string tempName = namespaceStr.substr( i, i2-i );
    1719
    18         push_back( tempName );
     20        push_back(std::move(tempName));
    1921
    2022        if( i2 == std::string::npos ){
     
    2628}
    2729
    28 NamespaceScopes NamespaceScopes::operator+ ( const NamespaceScopes &namespaceScopes ) const
     30NamespaceScopes ActiveBasic::Common::Lexical::operator +(const NamespaceScopes &lhs, const NamespaceScopes &rhs)
    2931{
    30     NamespaceScopes result;
    31     result.reserve( this->size() + namespaceScopes.size() );
    32     result = *this;
    33     result.append( namespaceScopes );
    34     return result;
     32    return NamespaceScopes(lhs) += rhs;
    3533}
    3634
  • trunk/ab5.0/abdev/ab_common/src/Lexical/NamespaceSupporter.cpp

    r750 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35using namespace ActiveBasic::Common::Lexical;
  • trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp

    r750 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35#define BREAK_EIP(checkEip)  (obp+0x00401000>=checkEip)
  • trunk/ab5.0/abdev/ab_common/src/Lexical/ObjectModule.cpp

    r750 r828  
    1 #pragma warning(disable : 4996)
     1//#pragma warning(disable : 4996)
    22
    33#include <map>
     
    2929
    3030
     31#pragma warning(push)
     32#pragma warning(disable: 4244 6011 6326)
    3133#ifdef OBJECT_MODULE_IS_NOT_BINARY
    3234#include <boost/archive/xml_oarchive.hpp>
     
    4244#include <boost/serialization/map.hpp>
    4345#include <boost/serialization/version.hpp>
    44 #include <boost/serialization/is_abstract.hpp>
    4546#include <boost/serialization/serialization.hpp>
    4647#include <boost/serialization/nvp.hpp>
    4748#include <boost/serialization/export.hpp>
     49#pragma warning(pop)
    4850
    4951#define foreach(v, c) for each (v in c)
     
    252254    return isSuccessful;
    253255}
     256
     257BOOST_CLASS_EXPORT_IMPLEMENT( DynamicMethod );
     258BOOST_CLASS_EXPORT_IMPLEMENT( StaticMethod );
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Parameter.cpp

    r708 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35Parameter::Parameter( const std::string &varName, const Type &type, bool isRef, const std::string initValue )
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Procedure.cpp

    r750 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35
     
    243245
    244246    // ハッシュ値を取得
    245     UserProc *pUserProc = GetHashArrayElement( simpleName );
    246     while(pUserProc){
     247    foreach (auto pUserProc, GetHashArrayElement( simpleName ))
     248    {
    247249        if( pUserProc->IsGlobalProcedure() ){
    248250            if( pUserProc->IsEqualSymbol( localSymbol ) ){
     
    250252            }
    251253        }
    252 
    253         pUserProc=pUserProc->GetChainNext();
    254254    }
    255255}
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Source.cpp

    r769 r828  
    945945    return true;
    946946}
    947 
    948 int SourceCodePosition::GetRelationalObjectModuleIndex() const
    949 {
    950     if( this->IsNothing() )
    951     {
    952         _ASSERTE( false );
    953         throw;
    954     }
    955 
    956     return relationalObjectModuleIndex;
    957 }
    958 bool SourceCodePosition::IsNothing() const
    959 {
    960     if( this->relationalObjectModuleIndex == -1 && this->pos == -1 )
    961     {
    962         return true;
    963     }
    964 
    965     if( this->relationalObjectModuleIndex == -1 || this->pos == -1 )
    966     {
    967         _ASSERTE( false );
    968         throw;
    969     }
    970 
    971     return false;
    972 }
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Symbol.cpp

    r752 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35using namespace ActiveBasic::Common::Lexical;
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Template.cpp

    r640 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35ExpandedTemplateClass::~ExpandedTemplateClass()
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp

    r750 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
     4#include "Lexical/Type.h"
    25
    36const int Type::basicTypeList[] = {
     
    539542
    540543int Type::GetBasicTypeFromSimpleName( const char *variable ){
    541     extern char DefIntVari[26],DefSngVari[26],DefStrVari[26],divNum,dsvNum,dStrvNum;
     544    assert(variable != nullptr);
     545    auto length = std::strlen(variable);
     546    assert(length > 0);
     547
    542548    int i;
    543549    char name[VN_SIZE];
    544550
    545551    //構造体メンバの場合を考慮
    546     for(i=lstrlen(variable);i>0;i--){
     552    for(i=length;i>0;i--){
    547553        if(variable[i]=='.'){
    548554            i++;
  • trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp

    r750 r828  
    11#include "stdafx.h"
     2#include <jenga/include/jenga.h>
     3#include <abdev/ab_common/include/ab_common.h>
    24
    35TypeDef::TypeDef( const Symbol &symbol, const std::string &baseName, const Type &baseType )
  • trunk/ab5.0/abdev/ab_common/src/Lexical/Variable.cpp

    r640 r828  
    1212{
    1313}
     14
    1415Variable::Variable( const Variable &var )
    1516    : RelationalObjectModuleItem( var )
     
    2425{
    2526}
     27
     28Variable::Variable(Variable&& var)
     29    : RelationalObjectModuleItem(std::move(var))
     30    , type(std::move(var.type))
     31    , isConst(std::move(var.isConst))
     32    , isRef(std::move(var.isRef))
     33    , isArray(std::move(var.isArray))
     34    , subscripts(std::move(var.subscripts))
     35    , isParameter(std::move(var.isParameter))
     36    , paramStrForConstructor(std::move(var.paramStrForConstructor))
     37    , hasInitData(std::move(var.hasInitData))
     38{
     39}
     40
    2641Variable::Variable()
    2742{
     43}
     44
     45Variable& Variable::operator =(Variable&& var)
     46{
     47    RelationalObjectModuleItem::operator =(std::move(var));
     48    type = std::move(var.type);
     49    isConst = std::move(var.isConst);
     50    isRef = std::move(var.isRef);
     51    isArray = std::move(var.isArray);
     52    subscripts = std::move(var.subscripts);
     53    isParameter = std::move(var.isParameter);
     54    paramStrForConstructor = std::move(var.paramStrForConstructor);
     55    hasInitData = std::move(var.hasInitData);
     56    return *this;
    2857}
    2958
  • trunk/ab5.0/abdev/ab_common/src/ResourceManager/ResourceManager.cpp

    r769 r828  
    3939
    4040    std::string baseDir = Jenga::Common::Path::ExtractDirPath( resourceFilePath );
     41
     42    if (buffer.empty())
     43    {
     44        return false;
     45    }
    4146
    4247    i2=0;
  • trunk/ab5.0/abdev/ab_common/stdafx.h

    r773 r828  
    11#pragma once
    2 #pragma strict_gs_check(on)
    32
    43#include <map>
     
    2019
    2120//boost libraries
     21#pragma warning(push)
     22#pragma warning(disable: 6326)
    2223#include <boost/foreach.hpp>
    2324#include <boost/serialization/serialization.hpp>
    2425#include <boost/serialization/nvp.hpp>
    2526#include <boost/serialization/export.hpp>
     27#pragma warning(pop)
    2628
    2729#include <jenga/include/jenga.h>
Note: See TracChangeset for help on using the changeset viewer.