/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* $Source: src/usr/diag/prdf/common/framework/config/prdfParentDomain.H $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ /* COPYRIGHT International Business Machines Corp. 1996,2014 */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ /* */ /* http://www.apache.org/licenses/LICENSE-2.0 */ /* */ /* Unless required by applicable law or agreed to in writing, software */ /* distributed under the License is distributed on an "AS IS" BASIS, */ /* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ /* implied. See the License for the specific language governing */ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ #ifndef prdfParentDomain_H #define prdfParentDomain_H #include #include namespace PRDF { /** Template class that Define a domain Parent that contain other domains as children. @par @note Parent class: Domain @par Usage Examples: @code @endcode */ template class ParentDomain { public: //The information stored for chaining Domains is two things. a Chip of origin. // Also, a pointer the the child domain. The child domain is the next domain in // a potential chain or string of domains. The chip is the original chip that started it. typedef std::pair< TARGETING::TargetHandle_t, T * > ChipToDomainPointerPairType; typedef std::vector< ChipToDomainPointerPairType > VectorOfDomainPointerType; // Need to add typename here to tell the compiler that vector< ... >::iterator is a type. // Otherwise because of the T template parm it doesn't know it's a type yet. typedef typename std::vector< ChipToDomainPointerPairType >::iterator iterator; /** Constructor

    Parameter: domainId: Identifies the Domain (See iipconst.h)
    Parameter: size: Estimate of max number of chips in domain
    Returns: None.
    Requirements: None.
    Promises: Object created
    Exceptions: None.
    Notes:

*/ ParentDomain(); /** Add Children to this chip in this domain.

    Parameter: domainId: Identifies the Domain (See iipconst.h)
    Parameter: chip: Parent to add children to.
    Parameter: chipList: List of children to add to this Parent.
    Returns: SUCCESS or FAILURE.
    Requirements: None.
    Promises: Object created
    Exceptions: None.
    Notes:

*/ int32_t AddChild(TARGETING::TargetHandle_t i_pchipHandle, T * i_childDomain); /** Returns a begin iterator to a list of children domains.

    Parameter: None.
    Returns: begin iterator.
    Requirements: None.
    Promises: None.
    Exceptions: None.
    Notes:

*/ iterator getBeginIterator(); /** Returns a end iterator to a list of children domains.

    Parameter: None.
    Returns: end iterator.
    Requirements: None.
    Promises: None.
    Exceptions: None.
    Notes:

*/ iterator getEndIterator(); /** Prints out the ids of the parent chip and children domains.

    Parameter: None
    Returns: begin iterator.
    Requirements: None.
    Promises: None.
    Exceptions: None.
    Notes:

*/ void printChildrenIds(); protected: private: VectorOfDomainPointerType iv_childrenDomains; }; } // end namespace PRDF #endif