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

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

Location:
trunk
Files:
23 edited

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/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 ){
Note: See TracChangeset for help on using the changeset viewer.