Changeset 817 in dev for branches/egtra/ab5.0/abdev/BasicCompiler_Common/include/Messenger.h
- Timestamp:
- Mar 19, 2011, 10:47:28 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/egtra/ab5.0/abdev/BasicCompiler_Common/include/Messenger.h
r812 r817 24 24 { 25 25 } 26 26 27 ErrorInfo( int errorCode, const std::string &keyword, int sourceIndex ); 28 29 ErrorInfo(ErrorInfo&& y) 30 : errorCode(std::move(y.errorCode)) 31 , keyword(std::move(y.keyword)) 32 , sourceFilePath(std::move(y.sourceFilePath)) 33 , sourceLineNum(std::move(y.sourceLineNum)) 34 , errorLineNum(std::move(y.errorLineNum)) 35 { 36 } 37 38 ErrorInfo(ErrorInfo const& y) 39 : errorCode(y.errorCode) 40 , keyword(y.keyword) 41 , sourceFilePath(y.sourceFilePath) 42 , sourceLineNum(y.sourceLineNum) 43 , errorLineNum(y.errorLineNum) 44 { 45 } 46 47 ErrorInfo& operator =(ErrorInfo&& y) 48 { 49 errorCode = std::move(y.errorCode); 50 keyword = std::move(y.keyword); 51 sourceFilePath = std::move(y.sourceFilePath); 52 sourceLineNum = std::move(y.sourceLineNum); 53 errorLineNum = std::move(y.errorLineNum); 54 return *this; 55 } 56 57 ErrorInfo& operator =(ErrorInfo const& y) 58 { 59 return *this = std::move(ErrorInfo(y)); 60 } 27 61 28 62 int GetErrorCode() const … … 63 97 64 98 public: 99 ErrorMessenger() {} 100 65 101 void Output( const ErrorInfo &errorInfo ); 66 102 void Output( int errorCode, const std::string &keyword, int sourceIndex = -1 ); … … 75 111 76 112 void ShowErrorLine( int errorLineNum ); 113 114 private: 115 ErrorMessenger(ErrorMessenger const&); 116 ErrorMessenger& operator =(ErrorMessenger const&); 77 117 };
Note:
See TracChangeset
for help on using the changeset viewer.