Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 1 | /* IBM_PROLOG_BEGIN_TAG */ |
| 2 | /* This is an automatically generated prolog. */ |
| 3 | /* */ |
| 4 | /* $Source: src/usr/diag/prdf/common/framework/register/prdfScomRegisterAccess.C $ */ |
| 5 | /* */ |
| 6 | /* OpenPOWER HostBoot Project */ |
| 7 | /* */ |
| 8 | /* COPYRIGHT International Business Machines Corp. 2012,2014 */ |
| 9 | /* */ |
| 10 | /* Licensed under the Apache License, Version 2.0 (the "License"); */ |
| 11 | /* you may not use this file except in compliance with the License. */ |
| 12 | /* You may obtain a copy of the License at */ |
| 13 | /* */ |
| 14 | /* http://www.apache.org/licenses/LICENSE-2.0 */ |
| 15 | /* */ |
| 16 | /* Unless required by applicable law or agreed to in writing, software */ |
| 17 | /* distributed under the License is distributed on an "AS IS" BASIS, */ |
| 18 | /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ |
| 19 | /* implied. See the License for the specific language governing */ |
| 20 | /* permissions and limitations under the License. */ |
| 21 | /* */ |
| 22 | /* IBM_PROLOG_END_TAG */ |
| 23 | |
| 24 | #include <prdfScomRegisterAccess.H> |
| 25 | #include <prdfScanFacility.H> |
| 26 | #include <prdfRegisterCache.H> |
| 27 | #include <prdfExtensibleChip.H> |
| 28 | namespace PRDF |
| 29 | { |
| 30 | |
| 31 | ScomRegisterAccess::ScomRegisterAccess( |
| 32 | const SCAN_COMM_REGISTER_CLASS & i_pRegister, |
| 33 | ExtensibleChip * i_pRuleChip ) : |
| 34 | ScomRegister( i_pRegister ), |
| 35 | iv_containerChip( i_pRuleChip ) |
| 36 | {} |
| 37 | |
| 38 | //---------------------------------------------------------------------- |
| 39 | |
| 40 | ExtensibleChip* ScomRegisterAccess::getChip( )const |
| 41 | { |
| 42 | return iv_containerChip; |
| 43 | } |
| 44 | |
| 45 | //---------------------------------------------------------------------- |
| 46 | |
| 47 | bool ScomRegisterAccess::operator == ( |
| 48 | const ScomRegisterAccess & i_rightRegister ) const |
| 49 | { |
| 50 | if( GetAddress() == i_rightRegister.GetAddress() ) |
| 51 | { |
| 52 | return ( getChip() == i_rightRegister.getChip() ); |
| 53 | } |
| 54 | else |
| 55 | { |
| 56 | return false ; |
| 57 | } |
| 58 | |
| 59 | } |
| 60 | //---------------------------------------------------------------------- |
| 61 | |
| 62 | bool ScomRegisterAccess::operator < ( |
| 63 | const ScomRegisterAccess & i_rightRegister ) const |
| 64 | { |
| 65 | if( GetAddress() == i_rightRegister.GetAddress() ) |
| 66 | { |
| 67 | return ( getChip() < i_rightRegister.getChip() ); |
| 68 | } |
| 69 | else |
| 70 | { |
| 71 | return ( GetAddress() < i_rightRegister.GetAddress() ); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | //---------------------------------------------------------------------- |
| 76 | bool ScomRegisterAccess::operator >= ( |
| 77 | const ScomRegisterAccess & i_right ) const |
| 78 | { |
| 79 | return !( *this < i_right ); |
| 80 | } |
| 81 | |
| 82 | //---------------------------------------------------------------------- |
| 83 | }//namespace PRDF ends |