//Copyright 2020 Siemens Digital Industries Software //================================================== //Copyright $2016. //Siemens Product Lifecycle Management Software Inc. //All Rights Reserved. //================================================== //Copyright 2020 Siemens Digital Industries Software /** @file ManageBulkData is a Resource Acquisition Is Initialization (RAII) class for managing BulkData.
Instances of this class need to be created/used only by the framework (e.g. auto-generated Dispatch mechanism(<BO>Dispatch::<op>) for a set-based Operation).
To facilitate the compilation of the auto-generated <BO>Dispatch::<op> operation, this class is made public.
This class and its members are not intended to be used explicitly for any other purpose.
As a consequence, there will be no support for issues stemming from creating instances of this class and calling its APIs explicitly. */ #ifndef MANAGEBULKDATA_HXX #define MANAGEBULKDATA_HXX #include #include #include #include namespace Teamcenter { class ManageBulkData; class BulkData; class OperationObjectBatch; class OperationDispatcher; class BulkInput; } class METAFRAMEWORK_API Teamcenter::ManageBulkData { public: /** Constructor */ ManageBulkData( const BulkData *bd, /**< (I) Input BulkData information if applicable */ const std::string &opId /**< (I) current operation ID */ ); /** Destructor */ virtual ~ManageBulkData(); /** Retrieves the BulkData associated with this instance */ BulkData * getBulkData() const; /** Performs Database actions for the objects collected in it's BulkData @returns
  • #ITK_ok on success
*/ int saveDeleteUnlock(); /** Performs Database actions for the objects collected in it's BulkData @returns
  • #ITK_ok on success
*/ int saveDeleteUnlock( const std::string& opId /**< (I) current operation ID */ ); /** Performs stacking of InputsVector objects & OperationDispatchers for postActions for operations if applicable with BulkData @returns
  • @c true if stacking of postActions is done
  • @c false if stacking of postAction is not done
*/ bool stackPostActions( const std::vector< Teamcenter::OperationObjectBatch* >& batches, /**< (I) The OperationObjectBatches which need to stacked for current operation */ const std::string& opId /**< (I) current operation ID */ ); /** Gets stacked InputsVector objects & OperationDispatchers for postActions for operations if applicable from BullkData */ int getPostActionsData( std::vector &opDispVec, /**< (O) The vector of OperationDispatcher for the inputs to execute postActions */ std::vector< std::vector< Teamcenter::BulkInput* > > &bulkInputsVec /**< (O) The vector of InputsVector for executing postActions */ ); /** Gets stacked InputsVector objects & OperationDispatchers for postActions for operations if applicable from BullkData, only when current opId and BulkData's opId are same */ int getPostActionsData( const std::string &opId, /**< (I) current operation ID */ std::vector &opDispVec, /**< (O) The vector of OperationDispatcher for the inputs to execute postActions */ std::vector< std::vector< Teamcenter::BulkInput* > > &bulkInputsVec /**< (O) The vector of InputsVector for executing postActions */ ); private: /** restricting default constructor */ ManageBulkData(); /** Copy constructor and assignment operator declarations as private to restrict */ ManageBulkData( const ManageBulkData & other ); ManageBulkData & operator=( const ManageBulkData & other ); /** Creates a BulkData object */ int createBulkData( const std::string & opId, /**< (I) The operation ID */ BulkData*& bd /**< (OF) Created BulkData instance */ ); /** Deletes a BulkData object */ void deleteBulkData( BulkData *obj /**< (I) Input BulkData instance to be deleted */ ); BulkData *m_bd; /**< Representing BulkData instance */ }; #include #endif