Changeset 816 in dev for branches/egtra/ab5.0/abdev
- Timestamp:
- Mar 19, 2011, 9:13:12 PM (14 years ago)
- Location:
- branches/egtra/ab5.0/abdev
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/egtra/ab5.0/abdev/BasicCompiler_Common/hash.cpp
r806 r816 22 22 /////////////////////////// 23 23 24 auto const s = LexicalAnalyzer::FullNameToSymbol( fullName ); 25 24 26 // ハッシュ値を取得 25 27 foreach (auto pDllProc, compiler.GetObjectModule().meta.GetDllProcs().GetHashArrayElement(simpleName)) 26 28 { 27 if( pDllProc->IsEqualSymbol( LexicalAnalyzer::FullNameToSymbol( fullName ) ) ){ 29 if( pDllProc->IsEqualSymbol( s ) ) 30 { 28 31 return pDllProc; 29 32 } -
branches/egtra/ab5.0/abdev/ab_common/include/Environment.h
r773 r816 50 50 Environment::isRemoveExternal = isRemoveExternalMark; 51 51 } 52 53 private: 54 Environment(); 55 Environment(Environment const&); 56 Environment& operator =(Environment const&); 57 ~Environment(); 52 58 }; 53 59 -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Class.h
r750 r816 28 28 { 29 29 } 30 31 private: 32 ClassPrototype(ClassPrototype const&); 33 ClassPrototype& operator =(ClassPrototype const&); 30 34 }; 31 35 … … 497 501 498 502 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 503 504 private: 505 CClass(CClass const&); 506 CClass& operator =(CClass const&); 499 507 }; 500 508 … … 528 536 const CClass *GetObjectClassPtr() const; 529 537 const CClass *GetInterfaceInfoClassPtr() const; 538 539 private: 540 Classes(Classes const&); 541 Classes& operator =(Classes const&); 530 542 }; -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Const.h
r647 r816 43 43 { 44 44 } 45 private: 45 46 CConst() 47 : RelationalObjectModuleItem() 48 , type() 49 , i64data() 46 50 { 47 51 } 52 public: 48 53 ~CConst() 49 54 { … … 66 71 67 72 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 73 74 private: 75 CConst(CConst const&); 76 CConst& operator =(CConst const&); 68 77 }; 69 78 class Consts : public Jenga::Common::Hashmap<CConst> … … 81 90 82 91 public: 92 Consts() {} 83 93 84 94 void Add( const Symbol &symbol, _int64 i64data, const Type &type ); … … 93 103 double GetDoubleData( const Symbol &symbol ); 94 104 bool IsStringPtr( const Symbol &symbol, bool isUnicode ); 105 106 private: 107 Consts(Consts const&); 108 Consts& operator =(Consts const&); 95 109 }; 96 110 … … 153 167 154 168 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 169 170 private: 171 ConstMacro(ConstMacro const&); 172 ConstMacro& operator =(ConstMacro const&); 155 173 }; 156 174 class ConstMacros … … 169 187 170 188 public: 189 ConstMacros() {} 190 171 191 bool Add( const Symbol &symbol, const char *parameterStr ); 172 192 ConstMacro *Find( const Symbol &name ); 193 194 private: 195 ConstMacros(ConstMacros const&); 196 ConstMacros& operator =(ConstMacros const&); 173 197 }; -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Delegate.h
r640 r816 96 96 97 97 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 98 99 private: 100 Delegate(Delegate const&); 101 Delegate& operator =(Delegate const&); 98 102 }; 99 103 typedef Jenga::Common::Hashmap<Delegate> Delegates; -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Interface.h
r728 r816 17 17 18 18 public: 19 DynamicMethodsPrototype() {}20 DynamicMethodsPrototype( const DynamicMethodsPrototype &dynamicMethodsPrototype)21 : dynamicMethods( dynamicMethodsPrototype.dynamicMethods)19 DynamicMethodsPrototype() {} 20 DynamicMethodsPrototype(DynamicMethodsPrototype&& dynamicMethodsPrototype) 21 : dynamicMethods(std::move(dynamicMethodsPrototype.dynamicMethods)) 22 22 { 23 23 } 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 24 40 ~DynamicMethodsPrototype(){} 25 41 … … 62 78 public: 63 79 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 } 64 86 Interface( const Interface &objInterface ) 65 87 : DynamicMethodsPrototype( objInterface ) … … 72 94 , vtblOffset( NULL ) 73 95 { 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)); 74 109 } 75 110 -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Meta.h
r640 r816 163 163 164 164 void Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 165 166 private: 167 Meta(Meta const&); 168 Meta& operator =(Meta const&); 165 169 }; -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Method.h
r776 r816 25 25 { 26 26 } 27 27 28 CMethod() 28 { 29 } 30 29 : MemberPrototype() 30 , pUserProc() 31 { 32 } 33 34 protected: 35 CMethod(CMethod const& y) 36 : MemberPrototype(y) 37 , pUserProc(y.pUserProc) 38 { 39 } 40 41 public: 31 42 const UserProc &GetUserProc() const 32 43 { … … 50 61 51 62 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 63 64 private: 65 CMethod& operator =(CMethod const&); 52 66 }; 53 67 … … 103 117 { 104 118 } 105 DynamicMethod( const CMethod &method )119 explicit DynamicMethod( const CMethod &method ) 106 120 : CMethod( &method.GetUserProc(), method.GetAccessibility() ) 107 121 , isAbstract( method.IsAbstract() ) … … 116 130 } 117 131 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 118 154 DynamicMethod::OverrideResult::EnumType Override( const UserProc *pUserProc, Prototype::Accessibility accessibility, bool isOverrideModifier ); 119 155 … … 182 218 } 183 219 220 // ムーブコンストラクタ 221 StaticMethod(StaticMethod&& y); 222 184 223 // コピーコンストラクタ 185 224 StaticMethod( const StaticMethod &staticMethod ); … … 255 294 Methods(); 256 295 296 // ムーブコンストラクタ 297 Methods(Methods&& methods); 298 257 299 // コピーコンストラクタ 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 } 259 312 260 313 // デストラクタ -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/NamespaceSupporter.h
r670 r816 65 65 // 指定された名前空間が同一エリアと見なされるかどうかをチェック 66 66 bool IsSameAreaNamespace( const NamespaceScopes &baseNamespaceScopes, const NamespaceScopes &entryNamespaceScopes ) const; 67 68 private: 69 NamespaceSupporter(NamespaceSupporter const&); 70 NamespaceSupporter& operator =(NamespaceSupporter const&); 67 71 }; 68 72 -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/NativeCode.h
r641 r816 97 97 } 98 98 } 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 } 99 122 ~Schedule() 100 123 { … … 151 174 { 152 175 } 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 } 153 199 154 200 long GetNativeCodePos() const -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h
r640 r816 43 43 44 44 public: 45 ObjectModule() {} 45 46 46 47 const std::string &GetName() const … … 75 76 bool ReadString( const std::string &str ); 76 77 bool WriteString( std::string &str ) const; 78 79 private: 80 ObjectModule(ObjectModule const&); 81 ObjectModule& operator =(ObjectModule const&); 77 82 }; 78 83 typedef std::vector<ObjectModule *> ObjectModules; -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Parameter.h
r632 r816 29 29 Parameter( const Parameter ¶m, const Type &type ); 30 30 Parameter( const Parameter ¶m ); 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)) {} 31 37 Parameter(); 32 38 ~Parameter(); 33 39 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 34 55 void SetArray( const Subscripts &subscripts ){ 35 56 isArray = true; … … 46 67 return isRef; 47 68 } 48 bool IsArray(){ 69 bool IsArray() const 70 { 49 71 return isArray; 50 72 } … … 76 98 77 99 public: 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 } 78 114 79 115 bool Equals( const Parameters ¶ms, bool isContravariant = false ) const; -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Procedure.h
r750 r816 56 56 { 57 57 } 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 58 98 ~Procedure(){ 59 99 foreach( Parameter *pParam, params ){ … … 393 433 394 434 static const UserProc *pGlobalProc; 435 436 private: 437 UserProc(UserProc const&); 438 UserProc& operator =(UserProc const&); 395 439 }; 396 440 … … 418 462 419 463 void EnumGlobalProcs( const char *simpleName, const Symbol &localSymbol, std::vector<const UserProc *> &subs ); 464 465 private: 466 UserProcs(UserProcs const&); 467 UserProcs& operator =(UserProcs const&); 420 468 }; 421 469 … … 499 547 500 548 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 549 550 private: 551 DllProc(DllProc const&); 552 DllProc& operator =(DllProc const&); 501 553 }; 502 554 class DllProcs : public Jenga::Common::Hashmap<DllProc> 503 555 { 556 public: 557 DllProcs() {} 558 504 559 // XMLシリアライズ用 505 560 private: … … 512 567 boost::serialization::base_object<Jenga::Common::Hashmap<DllProc>>(*this)); 513 568 } 569 570 DllProcs(DllProcs const&); 571 DllProcs& operator =(DllProcs const&); 514 572 }; 515 573 … … 540 598 541 599 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 600 601 ProcPointer(ProcPointer const&); 602 ProcPointer& operator =(ProcPointer const&); 542 603 }; 543 604 … … 569 630 clear(); 570 631 } 632 633 ProcPointers(ProcPointers const&); 634 ProcPointers& operator =(ProcPointers const&); 571 635 }; -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Prototype.h
r637 r816 61 61 isUsing = true; 62 62 } 63 64 private: 65 Prototype(Prototype const&); 66 Prototype& operator =(Prototype const&); 63 67 }; 64 68 … … 80 84 { 81 85 } 86 82 87 MemberPrototype() 83 88 : accessibility( Prototype::None ) … … 85 90 } 86 91 92 protected: 93 MemberPrototype(MemberPrototype const& y) 94 : accessibility(y.accessibility) 95 { 96 } 97 98 public: 87 99 Prototype::Accessibility GetAccessibility() const 88 100 { … … 109 121 return ( accessibility == Prototype::Public ); 110 122 } 123 124 private: 125 MemberPrototype& operator =(MemberPrototype const &); 111 126 }; 112 127 -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/RelationalObjectModuleItem.h
r640 r816 20 20 } 21 21 22 public: 22 protected: 23 RelationalObjectModuleItem(RelationalObjectModuleItem&& relationalObjectModuleItem) 24 : Symbol(std::move(relationalObjectModuleItem)) 25 , relationalObjectModuleIndex(std::move(relationalObjectModuleItem.relationalObjectModuleIndex)) 26 , isNeedResolve(std::move(false)) 27 { 28 } 29 23 30 RelationalObjectModuleItem( const RelationalObjectModuleItem &relationalObjectModuleItem ) 24 31 : Symbol( relationalObjectModuleItem ) … … 27 34 { 28 35 } 36 29 37 RelationalObjectModuleItem( const Symbol &symbol ) 30 38 : Symbol( symbol ) … … 33 41 { 34 42 } 43 35 44 RelationalObjectModuleItem() 36 45 : relationalObjectModuleIndex( -1 ) … … 39 48 } 40 49 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 66 public: 41 67 int GetRelationalObjectModuleIndex() const 42 68 { -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Resolver.h
r640 r816 15 15 } 16 16 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 17 41 int GetRelationalObjectModuleIndex() const 18 42 { … … 28 52 { 29 53 public: 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 30 67 void Add( const ResolveError &resolveError ) 31 68 { -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Source.h
r810 r816 103 103 text.buffer = static_cast<char*>(calloc(1, 1)); 104 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)); 105 114 } 106 115 ~Text(){ … … 309 318 ar & boost::serialization::make_nvp("vector_BasicSource", boost::serialization::base_object<std::vector<BasicSource>>(*this)); 310 319 } 320 321 public: 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 } 311 334 }; 312 335 … … 336 359 { 337 360 } 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 } 338 373 339 374 int GetRelationalObjectModuleIndex() const; -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Template.h
r640 r816 48 48 49 49 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 50 51 private: 52 ExpandedTemplateClass(ExpandedTemplateClass const&); 53 ExpandedTemplateClass& operator =(ExpandedTemplateClass const&); 50 54 }; 51 55 -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Type.h
r750 r816 66 66 index( (LONG_PTR)&objClass ){} 67 67 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 ) 68 Type(Type&& type) 69 : basicType(std::move(type.basicType)) 70 , index(std::move(type.index)) 71 , actualGenericTypes(std::move(type.actualGenericTypes)) 72 , formalTypeName(std::move(type.formalTypeName)) 73 , formalTypeIndex(std::move(type.formalTypeIndex)) 74 { 75 } 76 77 Type(Type const& type) 78 : basicType(type.basicType) 79 , index(type.index) 80 , actualGenericTypes(type.actualGenericTypes) 81 , formalTypeName(type.formalTypeName) 82 , formalTypeIndex(type.formalTypeIndex) 74 83 { 75 84 } … … 77 86 ~Type(); 78 87 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 88 Type& operator =(Type&& type) 89 { 90 basicType = std::move(type.basicType); 91 index = std::move(type.index); 92 actualGenericTypes = std::move(type.actualGenericTypes); 93 formalTypeName = std::move(type.formalTypeName); 94 formalTypeIndex = std::move(type.formalTypeIndex); 95 return *this; 96 } 97 98 Type& operator =(Type const& type) 99 { 100 return *this = Type(type); 101 } 102 103 inline int GetBasicType() const 89 104 { 90 105 return basicType; … … 253 268 254 269 public: 270 Types() {} 271 Types(Types&& y) : std::vector<Type>(std::move(y)) {} 272 Types(Types const& y) : std::vector<Type>(y) {} 273 274 Types& operator =(Types&& y) 275 { 276 std::vector<Type>::operator =(std::move(y)); 277 return *this; 278 } 279 280 Types& operator =(Types const& y) 281 { 282 return *this = std::move(Types(y)); 283 } 284 255 285 bool IsEquals( const Types &Types ) const; 256 286 }; … … 281 311 282 312 public: 283 GenericType( const std::string &name, const Type &type ) 284 : name( name ) 285 , type( type ) 286 { 287 } 313 GenericType( std::string name, Type type ) 314 : name(std::move(name)) 315 , type(std::move(type)) 316 { 317 } 318 288 319 GenericType() 289 320 { 290 321 } 322 323 GenericType(GenericType&& y) 324 : name(std::move(y.name)) 325 , type(std::move(y.type)) 326 { 327 } 328 329 GenericType(GenericType const& y) 330 : name(y.name) 331 , type(y.type) 332 { 333 } 334 335 GenericType& operator =(GenericType&& y) 336 { 337 name = std::move(y.name); 338 type = std::move(y.type); 339 return *this; 340 } 341 342 GenericType& operator =(GenericType const& y) 343 { 344 return *this = std::move(GenericType(y)); 345 } 346 291 347 ~GenericType() 292 348 { … … 329 385 { 330 386 } 387 331 388 BlittableType() 332 { 333 } 389 : basicType() 390 , pClass() 391 { 392 } 393 394 BlittableType(BlittableType&& y) 395 : basicType(std::move(y.basicType)) 396 , pClass(std::move(y.pClass)) 397 { 398 } 399 400 BlittableType(BlittableType const& y) 401 : basicType(y.basicType) 402 , pClass(y.pClass) 403 { 404 } 405 406 BlittableType& operator =(BlittableType&& y) 407 { 408 basicType = std::move(y.basicType); 409 pClass = std::move(y.pClass); 410 return *this; 411 } 412 413 BlittableType& operator =(BlittableType const& y) 414 { 415 return *this = std::move(BlittableType(y)); 416 } 417 334 418 const Type &GetBasicType() const 335 419 { … … 344 428 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 345 429 }; 430 346 431 class BlittableTypes : public std::vector<BlittableType> 347 432 { … … 358 443 359 444 public: 445 BlittableTypes() {} 446 BlittableTypes(BlittableTypes&& y) : std::vector<BlittableType>(std::move(y)) {} 447 BlittableTypes(BlittableTypes const& y) : std::vector<BlittableType>(y) {} 448 BlittableTypes& operator =(BlittableTypes&& y) 449 { 450 std::vector<BlittableType>::operator =(std::move(y)); 451 return *this; 452 } 453 BlittableTypes& operator =(BlittableTypes const& y) 454 { 455 return *this = std::move(BlittableTypes(y)); 456 } 457 360 458 bool IsExist( Type type ) const 361 459 { -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h
r640 r816 42 42 } 43 43 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 44 71 const std::string &GetBaseName() const 45 72 { … … 69 96 public: 70 97 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 } 71 109 ~TypeDefCollection(); 72 110 -
branches/egtra/ab5.0/abdev/ab_common/include/Lexical/Variable.h
r677 r816 64 64 public: 65 65 Variable( const Symbol &symbol, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor, bool hasInitData ); 66 Variable(Variable&& var); 66 67 Variable( const Variable &var ); 67 68 Variable(); 69 Variable& operator =(Variable&& y); 70 Variable& operator =(Variable const& y) 71 { 72 return *this = std::move(Variable(y)); 73 } 68 74 69 75 void SetArray( const Subscripts &subscripts ){ -
branches/egtra/ab5.0/abdev/ab_common/include/ResourceManager/ResourceManager.h
r622 r816 11 11 // IDEのみで使う 12 12 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 } 13 41 }; 42 14 43 typedef std::vector<ResourceItem> ResourceItems; 15 44 … … 18 47 { 19 48 public: 49 ResourceManager() {} 50 20 51 void Clear(); 21 52 bool Load( const std::string &resourceFilePath ); … … 28 59 ResourceItems iconResources; 29 60 std::string manifestFilePath; 61 62 private: 63 ResourceManager(ResourceManager const&); 64 ResourceManager operator =(ResourceManager const&); 30 65 }; 31 66 -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Method.cpp
r750 r816 1 1 #include "stdafx.h" 2 #include <stdexcept> 2 3 3 4 bool CMethod::Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ) … … 75 76 { 76 77 // 静的メソッドがコピーコンストラトされることは想定しない 77 throw ;78 throw std::domain_error("静的メソッドのコピー構築に対応していない"); 78 79 } 79 80 -
branches/egtra/ab5.0/abdev/ab_common/src/Lexical/Variable.cpp
r640 r816 12 12 { 13 13 } 14 14 15 Variable::Variable( const Variable &var ) 15 16 : RelationalObjectModuleItem( var ) … … 24 25 { 25 26 } 27 28 Variable::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 26 41 Variable::Variable() 27 42 { 43 } 44 45 Variable& 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; 28 57 } 29 58
Note:
See TracChangeset
for help on using the changeset viewer.