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

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

Location:
trunk
Files:
3 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/BasicCompiler_Common/include/Messenger.h

    r541 r828  
     1#pragma once
    12
    23class Messenger
     
    2324    {
    2425    }
     26
    2527    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    }
    2661
    2762    int GetErrorCode() const
     
    6297
    6398public:
     99    ErrorMessenger() {}
     100
    64101    void Output( const ErrorInfo &errorInfo );
    65102    void Output( int errorCode, const std::string &keyword, int sourceIndex = -1 );
     
    74111
    75112    void ShowErrorLine( int errorLineNum );
     113
     114private:
     115    ErrorMessenger(ErrorMessenger const&);
     116    ErrorMessenger& operator =(ErrorMessenger const&);
    76117};
Note: See TracChangeset for help on using the changeset viewer.