Changeset 828 in dev for trunk/ab5.0/abdev/ab_common
- Timestamp:
- Mar 19, 2012, 1:59:48 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 48 edited
- 9 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to
/branches/egtra merged eligible
-
Property svn:mergeinfo
set to
-
trunk/ab5.0/abdev
-
Property svn:ignore
set to
*.opensdf
*.sdf
*.suo
*.user
int
ipch
out
-
Property svn:ignore
set to
-
trunk/ab5.0/abdev/ab_common/include/BasicFixed.h
r601 r828 129 129 130 130 //オブジェクト指向エスケープシーケンス 131 #define ESC_CLASS (char)0xA0132 #define ESC_ENDCLASS (char)0xA1133 #define ESC_ABSTRACT (char)0xA2134 #define ESC_VIRTUAL (char)0xA3135 #define ESC_OVERRIDE (char)0xA4136 #define ESC_INHERITS (char)0xA5137 #define ESC_ENUM (char)0xA6138 #define ESC_ENDENUM (char)0xA7139 #define ESC_NEW (char)0xA8140 #define ESC_INTERFACE (char)0xA9141 #define ESC_ENDINTERFACE (char)0xAA142 #define ESC_DELEGATE (char)0xAB143 #define ESC_IMPLEMENTS (char)0xAC144 #define ESC_SYSTEM_STATIC_NEW (char)0xAD131 #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 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 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Class.h
r750 r828 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 }; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h
r647 r828 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 }; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Delegate.h
r640 r828 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; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Interface.h
r728 r828 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 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Meta.h
r640 r828 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 }; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Method.h
r640 r828 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 … … 161 197 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 162 198 }; 163 BOOST_CLASS_EXPORT ( DynamicMethod );199 BOOST_CLASS_EXPORT_KEY( DynamicMethod ); 164 200 class StaticMethod : public CMethod 165 201 { … … 182 218 } 183 219 220 // ムーブコンストラクタ 221 StaticMethod(StaticMethod&& y); 222 184 223 // コピーコンストラクタ 185 224 StaticMethod( const StaticMethod &staticMethod ); … … 237 276 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 238 277 }; 239 BOOST_CLASS_EXPORT ( StaticMethod );278 BOOST_CLASS_EXPORT_KEY( StaticMethod ); 240 279 241 280 class Methods : public std::vector<CMethod *> … … 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 // デストラクタ -
trunk/ab5.0/abdev/ab_common/include/Lexical/Namespace.h
r750 r828 7 7 class NamespaceScopes : public std::vector<std::string> 8 8 { 9 typedef std::vector<std::string> Base; 9 10 // XMLシリアライズ用 10 11 private: … … 17 18 18 19 public: 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 } 20 29 NamespaceScopes( const std::string &namespaceStr ); 21 30 NamespaceScopes( NamespaceScopes::const_iterator first, NamespaceScopes::const_iterator last ) 22 : std::vector<std::string>( first, last)31 : Base(first, last) 23 32 { 24 33 } 25 34 ~NamespaceScopes(){} 26 35 27 NamespaceScopes operator+ ( const NamespaceScopes &namespaceScopes ) const;28 29 36 void append( const NamespaceScopes &namespaceScopes ) 30 37 { 31 38 insert( end(), namespaceScopes.begin(), namespaceScopes.end() ); 39 } 40 41 NamespaceScopes& operator +=(const NamespaceScopes &namespaceScopes) 42 { 43 append(namespaceScopes); 44 return *this; 32 45 } 33 46 … … 77 90 }; 78 91 92 NamespaceScopes operator +(const NamespaceScopes &lhs, const NamespaceScopes &rhs); 93 79 94 inline bool operator ==( const NamespaceScopes &lhs, const NamespaceScopes &rhs ) 80 95 { … … 84 99 class NamespaceScopesCollection : public std::vector<NamespaceScopes> 85 100 { 101 typedef std::vector<NamespaceScopes> Base; 86 102 // XMLシリアライズ用 87 103 private: … … 93 109 94 110 public: 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 } 95 123 bool IsExist( const NamespaceScopes &namespaceScopes ) const 96 124 { -
trunk/ab5.0/abdev/ab_common/include/Lexical/NamespaceSupporter.h
r670 r828 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 -
trunk/ab5.0/abdev/ab_common/include/Lexical/NativeCode.h
r641 r828 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 -
trunk/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h
r640 r828 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; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Parameter.h
r632 r828 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; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Procedure.h
r750 r828 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 }; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Prototype.h
r637 r828 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 -
trunk/ab5.0/abdev/ab_common/include/Lexical/RelationalObjectModuleItem.h
r640 r828 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 { -
trunk/ab5.0/abdev/ab_common/include/Lexical/Resolver.h
r640 r828 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 { -
trunk/ab5.0/abdev/ab_common/include/Lexical/Source.h
r739 r828 21 21 { 22 22 } 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 } 23 33 ~IncludedFilesRelation() 24 34 { 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)); 25 46 } 26 47 … … 76 97 buffer[length] = 0; 77 98 } 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 } 78 115 ~Text(){ 79 116 free( buffer ); … … 100 137 static void SlideString(char *buffer, int slide){ 101 138 memmove(buffer+slide, buffer, strlen(buffer)+1); 139 } 140 141 protected: 142 static void SwapImpl(Text& lhs, Text& rhs) 143 { 144 std::swap(lhs.buffer, rhs.buffer); 145 std::swap(lhs.length, rhs.length); 102 146 } 103 147 }; … … 192 236 { 193 237 } 238 BasicSource(BasicSource&& basicSource) 239 : Text(std::move(basicSource)) 240 , includedFilesRelation(std::move(basicSource.includedFilesRelation)) 241 { 242 } 194 243 BasicSource( const std::string &source ) 195 244 { … … 230 279 bool GetLineInfo( int sourceCodePos, int &line, std::string &fileName ) const; 231 280 232 void operator = ( const BasicSource &source ){ 281 BasicSource& operator =(const BasicSource &source) 282 { 233 283 Realloc( source.length ); 234 284 strcpy( buffer, source.buffer ); 285 return *this; 286 } 287 BasicSource& operator =(BasicSource&& source) 288 { 289 Text::SwapImpl(*this, source); 290 return *this; 235 291 } 236 292 … … 262 318 ar & boost::serialization::make_nvp("vector_BasicSource", boost::serialization::base_object<std::vector<BasicSource>>(*this)); 263 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 } 264 334 }; 265 335 … … 289 359 { 290 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 } 291 373 292 374 int GetRelationalObjectModuleIndex() const; -
trunk/ab5.0/abdev/ab_common/include/Lexical/Symbol.h
r637 r828 38 38 39 39 public: 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)) 43 43 { 44 44 } 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)) 48 53 { 49 54 } 50 55 Symbol() 51 56 { 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); 52 67 } 53 68 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Template.h
r640 r828 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 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Type.h
r750 r828 1 #include <boost/foreach.hpp> 1 2 #pragma once 2 3 … … 66 67 index( (LONG_PTR)&objClass ){} 67 68 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) 74 84 { 75 85 } … … 77 87 ~Type(); 78 88 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 89 105 { 90 106 return basicType; … … 253 269 254 270 public: 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 255 286 bool IsEquals( const Types &Types ) const; 256 287 }; … … 281 312 282 313 public: 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 288 320 GenericType() 289 321 { 290 322 } 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 291 348 ~GenericType() 292 349 { … … 329 386 { 330 387 } 388 331 389 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 334 419 const Type &GetBasicType() const 335 420 { … … 344 429 virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ); 345 430 }; 431 346 432 class BlittableTypes : public std::vector<BlittableType> 347 433 { … … 358 444 359 445 public: 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 360 459 bool IsExist( Type type ) const 361 460 { -
trunk/ab5.0/abdev/ab_common/include/Lexical/TypeDef.h
r640 r828 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 -
trunk/ab5.0/abdev/ab_common/include/Lexical/Variable.h
r677 r828 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 ){ -
trunk/ab5.0/abdev/ab_common/include/ResourceManager/ResourceManager.h
r622 r828 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 -
trunk/ab5.0/abdev/ab_common/include/libs.h
r756 r828 11 11 #define lstrcmpiA _stricmp 12 12 13 #if 0 13 14 extern "C" 14 15 { … … 23 24 #define malloc dlmalloc 24 25 #define realloc dlrealloc 26 #endif -
trunk/ab5.0/abdev/ab_common/src/Environment.cpp
r773 r828 1 1 #include "stdafx.h" 2 2 #include <uxtheme.h> 3 4 DWORD const PROCESS_DEP_ENABLE = 0x00000001; 3 5 4 6 std::string ActiveBasic::Common::Environment::rootPath; -
trunk/ab5.0/abdev/ab_common/src/Lexical/Class.cpp
r750 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 #include <algorithm> 3 5 #include <boost/checked_delete.hpp> … … 777 779 778 780 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 { 783 785 //名前空間とクラス名が一致した 784 786 classes.push_back( pClass ); 785 787 } 786 pClass = pClass->GetChainNext();787 788 } 788 789 if( classes.size() > 0 ) 789 790 { 790 791 // 複数の名前空間の中に同一のクラス名が存在する場合があるので、アクセス可能で尚且つ階層が一番深いものをチョイスする 791 pClass = classes.front();792 auto pClass = classes.front(); 792 793 793 794 foreach( const CClass *pTempClass, classes ) -
trunk/ab5.0/abdev/ab_common/src/Lexical/Const.cpp
r700 r828 29 29 CConst *Consts::GetObjectPtr( const Symbol &symbol ) 30 30 { 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; 42 37 } 43 38 … … 131 126 ConstMacro *ConstMacros::Find( const Symbol &symbol ) 132 127 { 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; 144 134 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Interface.cpp
r750 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 Interface::Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters ) -
trunk/ab5.0/abdev/ab_common/src/Lexical/Member.cpp
r640 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 -
trunk/ab5.0/abdev/ab_common/src/Lexical/Meta.cpp
r750 r828 37 37 { 38 38 // 名前空間 39 BOOST_FOREACH( NamespaceScopes &namespaceScopes, meta.namespaceScopesCollection)39 foreach (NamespaceScopes const &namespaceScopes, meta.namespaceScopesCollection) 40 40 { 41 41 if( !this->namespaceScopesCollection.IsExist( namespaceScopes ) ) … … 46 46 47 47 // 関数・メソッド 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 { 52 50 if( pUserProc->IsExternal() ) 53 51 { … … 65 63 66 64 // 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 { 71 67 if( pDllProc->IsExternal() ) 72 68 { … … 81 77 82 78 // クラス 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 { 87 81 if( pClass->IsExternal() ) 88 82 { … … 132 126 133 127 // グローバル定数 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 { 138 130 if( pConst->IsExternal() ) 139 131 { … … 148 140 149 141 // グローバル定数マクロ 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 { 154 144 if( pConstMacro->IsExternal() ) 155 145 { … … 200 190 201 191 // デリゲート 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 { 206 194 if( pDelegate->IsExternal() ) 207 195 { … … 218 206 const ::Delegate &Meta::ToDelegate( const CClass &_class ) 219 207 { 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() ) ){ 224 212 //名前空間とクラス名が一致した 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"); 231 218 } 232 219 … … 256 243 { 257 244 // 関数・メソッド 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 { 263 247 pUserProc->Resolve( resolver, resolveErrors ); 264 248 } 265 249 266 250 // 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 { 272 253 pDllProc->Resolve( resolver, resolveErrors ); 273 254 } 274 255 275 256 // クラス 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 { 281 259 pClass->Resolve( resolver, resolveErrors ); 282 260 } … … 289 267 290 268 // グローバル定数 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 { 296 271 pConst->Resolve( resolver, resolveErrors ); 297 272 } 298 273 299 274 // グローバル定数マクロ 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 { 305 277 pConstMacro->Resolve( resolver, resolveErrors ); 306 278 } … … 325 297 326 298 // デリゲート 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 { 332 301 pDelegate->Resolve( resolver, resolveErrors ); 333 302 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Method.cpp
r750 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 4 #include <stdexcept> 2 5 3 6 bool CMethod::Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors ) … … 75 78 { 76 79 // 静的メソッドがコピーコンストラトされることは想定しない 77 throw ;80 throw std::domain_error("静的メソッドのコピー構築に対応していない"); 78 81 } 79 82 -
trunk/ab5.0/abdev/ab_common/src/Lexical/Namespace.cpp
r736 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 #include <algorithm> 3 5 … … 16 18 std::string tempName = namespaceStr.substr( i, i2-i ); 17 19 18 push_back( tempName);20 push_back(std::move(tempName)); 19 21 20 22 if( i2 == std::string::npos ){ … … 26 28 } 27 29 28 NamespaceScopes NamespaceScopes::operator+ ( const NamespaceScopes &namespaceScopes ) const30 NamespaceScopes ActiveBasic::Common::Lexical::operator +(const NamespaceScopes &lhs, const NamespaceScopes &rhs) 29 31 { 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; 35 33 } 36 34 -
trunk/ab5.0/abdev/ab_common/src/Lexical/NamespaceSupporter.cpp
r750 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 using namespace ActiveBasic::Common::Lexical; -
trunk/ab5.0/abdev/ab_common/src/Lexical/NativeCode.cpp
r750 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 #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) 2 2 3 3 #include <map> … … 29 29 30 30 31 #pragma warning(push) 32 #pragma warning(disable: 4244 6011 6326) 31 33 #ifdef OBJECT_MODULE_IS_NOT_BINARY 32 34 #include <boost/archive/xml_oarchive.hpp> … … 42 44 #include <boost/serialization/map.hpp> 43 45 #include <boost/serialization/version.hpp> 44 #include <boost/serialization/is_abstract.hpp>45 46 #include <boost/serialization/serialization.hpp> 46 47 #include <boost/serialization/nvp.hpp> 47 48 #include <boost/serialization/export.hpp> 49 #pragma warning(pop) 48 50 49 51 #define foreach(v, c) for each (v in c) … … 252 254 return isSuccessful; 253 255 } 256 257 BOOST_CLASS_EXPORT_IMPLEMENT( DynamicMethod ); 258 BOOST_CLASS_EXPORT_IMPLEMENT( StaticMethod ); -
trunk/ab5.0/abdev/ab_common/src/Lexical/Parameter.cpp
r708 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 Parameter::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 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 … … 243 245 244 246 // ハッシュ値を取得 245 UserProc *pUserProc = GetHashArrayElement( simpleName );246 while(pUserProc){247 foreach (auto pUserProc, GetHashArrayElement( simpleName )) 248 { 247 249 if( pUserProc->IsGlobalProcedure() ){ 248 250 if( pUserProc->IsEqualSymbol( localSymbol ) ){ … … 250 252 } 251 253 } 252 253 pUserProc=pUserProc->GetChainNext();254 254 } 255 255 } -
trunk/ab5.0/abdev/ab_common/src/Lexical/Source.cpp
r769 r828 945 945 return true; 946 946 } 947 948 int SourceCodePosition::GetRelationalObjectModuleIndex() const949 {950 if( this->IsNothing() )951 {952 _ASSERTE( false );953 throw;954 }955 956 return relationalObjectModuleIndex;957 }958 bool SourceCodePosition::IsNothing() const959 {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 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 using namespace ActiveBasic::Common::Lexical; -
trunk/ab5.0/abdev/ab_common/src/Lexical/Template.cpp
r640 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 ExpandedTemplateClass::~ExpandedTemplateClass() -
trunk/ab5.0/abdev/ab_common/src/Lexical/Type.cpp
r750 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 4 #include "Lexical/Type.h" 2 5 3 6 const int Type::basicTypeList[] = { … … 539 542 540 543 int 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 542 548 int i; 543 549 char name[VN_SIZE]; 544 550 545 551 //構造体メンバの場合を考慮 546 for(i=l strlen(variable);i>0;i--){552 for(i=length;i>0;i--){ 547 553 if(variable[i]=='.'){ 548 554 i++; -
trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp
r750 r828 1 1 #include "stdafx.h" 2 #include <jenga/include/jenga.h> 3 #include <abdev/ab_common/include/ab_common.h> 2 4 3 5 TypeDef::TypeDef( const Symbol &symbol, const std::string &baseName, const Type &baseType ) -
trunk/ab5.0/abdev/ab_common/src/Lexical/Variable.cpp
r640 r828 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 -
trunk/ab5.0/abdev/ab_common/src/ResourceManager/ResourceManager.cpp
r769 r828 39 39 40 40 std::string baseDir = Jenga::Common::Path::ExtractDirPath( resourceFilePath ); 41 42 if (buffer.empty()) 43 { 44 return false; 45 } 41 46 42 47 i2=0; -
trunk/ab5.0/abdev/ab_common/stdafx.h
r773 r828 1 1 #pragma once 2 #pragma strict_gs_check(on)3 2 4 3 #include <map> … … 20 19 21 20 //boost libraries 21 #pragma warning(push) 22 #pragma warning(disable: 6326) 22 23 #include <boost/foreach.hpp> 23 24 #include <boost/serialization/serialization.hpp> 24 25 #include <boost/serialization/nvp.hpp> 25 26 #include <boost/serialization/export.hpp> 27 #pragma warning(pop) 26 28 27 29 #include <jenga/include/jenga.h>
Note:
See TracChangeset
for help on using the changeset viewer.