//Copyright 2020 Siemens Digital Industries Software //================================================== //Copyright $2015. //Siemens Product Lifecycle Management Software Inc. //All Rights Reserved. //================================================== //Copyright 2020 Siemens Digital Industries Software /** @file This file contains the declaration for the ImpliedEffectivityCalc */ #ifndef TEAMCENTER_CFM_IMPLIEDEFFECTIVITYCALC #define TEAMCENTER_CFM_IMPLIEDEFFECTIVITYCALC #include #include #include /** @brief A convenient C++ class to calculate implied effectivity of item revisions.
This is required if the caller wish to calculate implied effectivity of item revisions. Use as follows : try catch is required as it throw the IFail exception. @code try { vector< string > effecs; ImpliedEffectivityCalc::getImpliedEffectivity( revRule, items, effecs); } catch( const IFail& ex ) { } @endcode */ namespace Teamcenter { class CFM_API ImpliedEffectivityCalc { public: /** Calculates the Implied Effectivity of the each input Item Revision.
To do so, it retrieves the Effectivity from the Release Status (Has Status, Any Status) objects of each Item Revision. @throws IFail exception with following errors.
  • #CFM_rev_rule_not_supported if the specified Revision Rule does not have "Has Status" or "Any Status" clause.
  • #PROP_invalid_object if an invalid object instance is used in conjunction with the property.
*/ static void getImpliedEffectivity( tag_t revRule, /**< (I) Revison Rule based on which the Effectivities are to be calculated */ const std::vector& itemRevs, /**< (I) Item Revisions for which the Effectivities needs to be calculated */ std::vector< std::string >& effectivities /**< (O) Array of Effectivities for the Item Revision */ ); private: /** Creates pair of item revision and release status object, pairs belong to one item are put into one vector. @throws IFail exception with following errors.
  • #CFM_rev_rule_not_supported if the specified Revision Rule does not have "Has Status" or "Any Status" clause.
  • #PROP_invalid_object if an invalid object instance is used in conjunction with the property.
*/ static void populateStatusWithRevision( tag_t revisionRule, /**< (I) Revison Rule based on which effectivity will be calculated */ const std::vector& items, /**< (I) Array of Items */ std::vector< std::vector< std::pair< tag_t, tag_t > > >& revStats /**< (O) This will be populated by this function. Each vector will contain pairs (item revision - release status) belong to one item */ ); }; } #include #endif