/* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ /* $Source: src/usr/diag/prdf/common/framework/config/prdfParentDomain.H $ */ /* */ /* IBM CONFIDENTIAL */ /* */ /* COPYRIGHT International Business Machines Corp. 1996,2013 */ /* */ /* p1 */ /* */ /* Object Code Only (OCO) source materials */ /* Licensed Internal Code Source Materials */ /* IBM HostBoot Licensed Internal Code */ /* */ /* The source code for this program is not published or otherwise */ /* divested of its trade secrets, irrespective of what has been */ /* deposited with the U.S. Copyright Office. */ /* */ /* Origin: 30 */ /* */ /* 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