src/Sim/Op/OpStatus.h

説明を見る。
00001 // 
00002 // Copyright (c) 2005-2008 Kenichi Watanabe.
00003 // Copyright (c) 2005-2008 Yasuhiro Watari.
00004 // Copyright (c) 2005-2008 Hironori Ichibayashi.
00005 // Copyright (c) 2008-2009 Kazuo Horio.
00006 // Copyright (c) 2009-2013 Naruki Kurata.
00007 // Copyright (c) 2005-2013 Ryota Shioya.
00008 // Copyright (c) 2005-2013 Masahiro Goshima.
00009 // 
00010 // This software is provided 'as-is', without any express or implied
00011 // warranty. In no event will the authors be held liable for any damages
00012 // arising from the use of this software.
00013 // 
00014 // Permission is granted to anyone to use this software for any purpose,
00015 // including commercial applications, and to alter it and redistribute it
00016 // freely, subject to the following restrictions:
00017 // 
00018 // 1. The origin of this software must not be misrepresented; you must not
00019 // claim that you wrote the original software. If you use this software
00020 // in a product, an acknowledgment in the product documentation would be
00021 // appreciated but is not required.
00022 // 
00023 // 2. Altered source versions must be plainly marked as such, and must not be
00024 // misrepresented as being the original software.
00025 // 
00026 // 3. This notice may not be removed or altered from any source
00027 // distribution.
00028 // 
00029 // 
00030 
00031 
00032 #ifndef SIM_OP_OP_STATUS_H
00033 #define SIM_OP_OP_STATUS_H
00034 
00035 
00036 namespace Onikiri
00037 {
00038 
00039     class OpStatus
00040     {
00041     public:
00042 
00043         // When you change the Status members, you need to add corresponding
00044         // members to ToString().
00045         enum Status 
00046         {
00047             OS_INVALID = 0,     //
00048             OS_FLUSHED,         // \~XtbV
00049             OS_FETCH,           // FetchernextPipeline
00050             OS_RENAME,          // RenamernextPipeline
00051             OS_DISPATCHING,     // DispatchernextPipeline
00052             OS_DISPATCHED,      // XPW[
00053             OS_ISSUING,         // issue
00054             OS_EXECUTING,       // タs
00055             OS_FINISHED,        // タsI
00056             OS_WRITING_BACK,    // CgobN
00057             OS_WRITTEN_BACK,    // CgobN
00058             OS_COMPLETED,       // ^CAXe[^XIvVp
00059             OS_NOP,             // NOPDispatcherタsI
00060             OS_COMITTING,       // in committing
00061             OS_COMITTED,        // after commit
00062             OS_RETIRED,         // ^CA
00063             OS_MAX
00064         };
00065 
00066         OpStatus() : 
00067             m_status( OS_INVALID )
00068         {
00069         }
00070 
00071         OpStatus( const OpStatus& status ) : 
00072             m_status( status.m_status )
00073         {
00074         }
00075         
00076         OpStatus( const Status& status ) :
00077             m_status( status )
00078         {
00079         }
00080 
00081 
00082         bool operator == ( const Status& rhs )  const 
00083         {   return m_status == rhs; }
00084 
00085         bool operator != ( const Status& rhs )  const 
00086         {   return m_status != rhs; }
00087 
00088         bool operator < ( const Status& rhs )   const 
00089         {   return m_status <  rhs; }
00090 
00091         bool operator <= ( const Status& rhs )  const  
00092         {   return m_status <= rhs; }
00093 
00094         bool operator > ( const Status& rhs )   const  
00095         {   return m_status > rhs;      }
00096 
00097         bool operator >= ( const Status& rhs )  const  
00098         {   return m_status >= rhs; }
00099 
00100 
00101         bool operator == ( const OpStatus& rhs )    const 
00102         {   return m_status == rhs.m_status;    }
00103             
00104         bool operator != ( const OpStatus& rhs )    const 
00105         {   return m_status != rhs.m_status;    }
00106             
00107         bool operator < ( const OpStatus& rhs )     const 
00108         {   return m_status <  rhs.m_status;    }
00109 
00110         bool operator <= ( const OpStatus& rhs )    const  
00111         {   return m_status <= rhs.m_status;    }
00112             
00113         bool operator > ( const OpStatus& rhs )     const  
00114         {   return m_status > rhs.m_status;     }
00115             
00116         bool operator >= ( const OpStatus& rhs )    const  
00117         {   return m_status >= rhs.m_status;    }
00118 
00119         const char* ToString();
00120 
00121     protected:
00122         Status m_status;
00123     };
00124 
00125     
00126 
00127 }; // namespace Onikiri
00128 
00129 #endif // SIM_OP_OP_STATUS_H
00130 

Onikiri2に対してTue Jun 18 14:34:24 2013に生成されました。  doxygen 1.4.7