You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

362 lines
13 KiB

//Copyright 2020 Siemens Digital Industries Software
//==================================================
//Copyright $2020.
//Siemens Product Lifecycle Management Software Inc.
//All Rights Reserved.
//==================================================
//Copyright 2020 Siemens Digital Industries Software
/*==================================================================================================
File description:
This file contains the declaration for the Business Object, Ptn0Partition
Filename: Ptn0Partition.hxx
Module: ptn0partition
@BMIDE autogenerated
==================================================================================================*/
#ifndef TEAMCENTER__PARTITION__PTN0PARTITION__HXX
#define TEAMCENTER__PARTITION__PTN0PARTITION__HXX
#include <unidefs.h>
#include <vector>
#include <string>
#include <common/tc_deprecation_macros.h>
#include <mdl0model/Mdl0ConditionalElement.hxx>
#include <ptn0partition/libptn0partition_exports.h>
namespace Teamcenter
{
namespace Partition
{
class Ptn0Partition;
}
}
namespace Teamcenter
{
namespace Partition
{
class Ptn0PartitionImpl;
}
}
namespace Teamcenter
{
namespace Partition
{
class Ptn0PartitionDelegate;
}
}
namespace Teamcenter
{
namespace Partition
{
class Ptn0PartitionDispatch;
}
}
namespace Teamcenter
{
namespace Partition
{
class Ptn0PartitionGenImpl;
}
}
namespace Teamcenter
{
class RootObjectImpl;
}
class PTN0PARTITION_API Teamcenter::Partition::Ptn0Partition
: public ::Teamcenter::AppModel::Mdl0ConditionalElement
{
public:
/**
* Get the Interface Name
* @return - return desc for getInterfaceName
*/
static const std::string& getInterfaceName();
///
/// Getter for a Boolean Property
/// @version Teamcenter 9
/// @param value - Parameter Value
/// @param isNull - Returns true if the Parameter value is null
/// @return - Status. 0 if successful
///
int getPtn0allows_add_content( bool &value, bool &isNull ) const;
///
/// Getter for a Boolean Property
/// @version Teamcenter 9
/// @param value - Parameter Value
/// @param isNull - Returns true if the Parameter value is null
/// @return - Status. 0 if successful
///
int getPtn0allows_remove_content( bool &value, bool &isNull ) const;
///
/// Getter for a Boolean Property
/// @version Teamcenter 10.1.3
/// @param value - Parameter Value
/// @param isNull - Returns true if the Parameter value is null
/// @return - Status. 0 if successful
///
int getPtn0IsActive( bool &value, bool &isNull ) const;
///
/// Getter for a Tag Array Property
/// @version Teamcenter 11.1
/// @param values - Parameter value
/// @param isNull - Returns true for an array element if the parameter value at that location is null
/// @return - Status. 0 if successful
///
int getPtn0membership_objects( std::vector< tag_t > &values, std::vector< int > &isNull ) const;
///
/// Getter for a string Property
/// @version Teamcenter 9
/// @param value - Parameter value
/// @param isNull - Returns true if the Parameter value is null
/// @return - Status. 0 if successful
///
int getPtn0partition_id( std::string &value, bool &isNull ) const;
///
/// Getter for a Tag Property
/// @version Teamcenter 9
/// @param value - Parameter value
/// @param isNull - Returns true if the Parameter value is null
/// @return - Status. 0 if successful
///
int getPtn0partition_recipe( tag_t &value, bool &isNull ) const;
///
/// Getter for a Tag Property
/// @version Teamcenter 9
/// @param value - Parameter value
/// @param isNull - Returns true if the Parameter value is null
/// @return - Status. 0 if successful
///
int getPtn0partition_scheme_type( tag_t &value, bool &isNull ) const;
///
/// Getter for an String Array Property
/// @version Teamcenter 9
/// @param values - Parameter value
/// @param isNull - Returns true for an array element if the parameter value at that location is null
/// @return - Status. 0 if successful
///
int getPtn0reference_designators( std::vector< std::string > &values, std::vector< int > &isNull ) const;
///
/// Getter for a Tag Property
/// @version Teamcenter 11.1
/// @param value - Parameter value
/// @param isNull - Returns true if the Parameter value is null
/// @return - Status. 0 if successful
///
int getPtn0scheme_object( tag_t &value, bool &isNull ) const;
///
/// Getter for a Tag Property
/// @version Teamcenter 9
/// @param value - Parameter value
/// @param isNull - Returns true if the Parameter value is null
/// @return - Status. 0 if successful
///
int getPtn0source_object( tag_t &value, bool &isNull ) const;
///
/// Getter for a Tag Property
/// @version Teamcenter 10.1
/// @param value - Parameter value
/// @param isNull - Returns true if the Parameter value is null
/// @return - Status. 0 if successful
///
int getPtn0source_partition( tag_t &value, bool &isNull ) const;
///
/// Setter for a Boolean Property
/// @version Teamcenter 10.1.3
/// @param value - Value to be set for the parameter
/// @param isNull - If true, set the parameter value to null
/// @return - Status. 0 if successful
///
int setPtn0IsActive( bool value, bool isNull=false );
///
/// Setter for a string Property; Once partition_id is set for a Partition object, it is advised not to change it. Otherwise it may lead to data consistency issues
/// @version Teamcenter 9
/// @param value - Value to be set for the parameter
/// @param isNull - If true, set the parameter value to null
/// @return - Status. 0 if successful
///
int setPtn0partition_id( const std::string &value, bool isNull=false );
///
/// Setter for a Tag Property
/// @version Teamcenter 9
/// @param value - Value to be set for the parameter
/// @param isNull - If true, set the parameter value to null
/// @return - Status. 0 if successful
///
int setPtn0partition_recipe( const tag_t &value, bool isNull=false );
///
/// Setter for a Tag Property
/// @version Teamcenter 9
/// @param value - Value to be set for the parameter
/// @param isNull - If true, set the parameter value to null
/// @return - Status. 0 if successful
///
int setPtn0partition_scheme_type( const tag_t &value, bool isNull=false );
///
/// Setter for an string Array Property
/// @version Teamcenter 9
/// @param values - Values to be set for the parameter
/// @param isNull - If array element is true, set the parameter value at that location as null
/// @return - Status. 0 if successful
///
int setPtn0reference_designators( const std::vector< std::string > &values, const std::vector< int > *isNull=0 );
///
/// Setter for a Tag Property
/// @version Teamcenter 9
/// @param value - Value to be set for the parameter
/// @param isNull - If true, set the parameter value to null
/// @return - Status. 0 if successful
///
int setPtn0source_object( const tag_t &value, bool isNull=false );
///
/// Get child partitions for this partition
/// @version Teamcenter 9
/// @param configurationContext - configuration context
/// @param childPartitions - vector of child partitions
/// @return - Zero if success otherwise the error code.
///
int ptn0getChildren( const tag_t &configurationContext, std::vector< tag_t > &childPartitions );
///
/// Get members of this partition
/// @version Teamcenter 9
/// @param configurationContext - configuration context
/// @param members - vector of partition members
/// @param contentPersistenceMode - 1-STATIC, 2-DYNAMIC, 3-return both STATIC and DYNAMIC members
/// @return - zero if success or error code
///
int ptn0getMembers( const tag_t &configurationContext, std::vector< tag_t > &members, const int contentPersistenceMode );
///
/// Get parent partitions for this partition
/// @version Teamcenter 9
/// @param configurationContext - configuration context
/// @param parentPartitions - Vector of parent partitions
/// @return - zero if success or error code
///
int ptn0getParents( const tag_t &configurationContext, std::vector< tag_t > &parentPartitions );
///
/// (re)generates static memberships for dynamic members of this partition
/// @version Teamcenter 9
/// @param configurationContext - Input configuration context
/// @return - zero if success or error code
///
int ptn0persistDynamicMembers( const tag_t &configurationContext );
///
/// Update children of Source and Target parent partition for MOVE / REPLACE operation code.
/// @version Teamcenter 10.1.3
/// @param children - vector of child partition tags for operation specified in actionCode
/// @param actionCode - 0-MOVE_REPARENTING_PARTITION, 1-REPLACE_REPARENTING_PARTITION
/// @param targetParent - Target parent partition used for operation specified in actionCode
/// @param failedChildren - Vector of children failed while executing operation specified in actionCode
/// @param errorCodes - Vector of error codes corresponding to failed children
/// @param errorMessages - Vector of error messages corresponding to failed children
/// @return - zero if success or error code.
///
int ptn0reparentPartition( const std::vector< tag_t > &children, const int actionCode, const tag_t targetParent, std::vector< tag_t > &failedChildren, std::vector< int > &errorCodes, std::vector< std::string > &errorMessages );
///
/// updates children of this partition according to action code ( ADD, REPLACE, REMOVE )
/// @version Teamcenter 9
/// @param children - vector of child tags
/// @param actionCode - 0-ADD, 1-REPLACE, 2-REMOVE
/// @param failedChildren - Vector of children failed to add, replace or remove
/// @return - zero if success or error code
///
int ptn0updateChildren( const std::vector< tag_t > &children, const int actionCode, std::vector< tag_t > &failedChildren );
///
/// Modify members of this partition
/// @version Teamcenter 9
/// @param members - vector of members to add,replace or remove t/from this partition
/// @param actionCode - 1-ADD, 2- REPLACE, 3-REMOVE
/// @param contentPersistenceMode - 1- STATIC; 2 - DYNAMIC
/// @param configurationContext - Input configuration context for dynamic members update
/// @param failedMembers - Vector of members failed to update on a target partition
/// @param errorCode - Vector of error codes corresponding to failed members
/// @return - zero if success or error code
///
int ptn0updateMembers( const std::vector< tag_t > &members, const int actionCode, const int contentPersistenceMode, const tag_t &configurationContext, std::vector< tag_t > &failedMembers, std::vector< int > &errorCode );
///
/// Update parents of this partition per action code: add,replace or remove
/// @version Teamcenter 9
/// @param parents - vector of parent tags to update
/// @param actionCode - 0-ADD, 1-REPLACE, 2-REMOVE
/// @param failedParents - Vector of parents failed to add, remove or replace
/// @return - zero for success or error code
///
int ptn0updateParents( const std::vector< tag_t > &parents, const int actionCode, std::vector< tag_t > &failedParents );
protected:
// Method to initialize
virtual void initialize( ::Teamcenter::RootObjectImpl* impl );
/**
* Constructor
*/
Ptn0Partition();
/**
* Destructor
*/
virtual ~Ptn0Partition();
private:
// Getter method for the Implementation Object
Ptn0PartitionImpl* getPtn0PartitionImpl() const;
// Setter method for the Implementation Object
::Teamcenter::RootObjectImpl* setPtn0PartitionImpl( ::Teamcenter::RootObjectImpl* impl );
// Method to set the delete impl boolean
void setDeleteImpl( bool del );
// Pointer to the Implementation object
Ptn0PartitionImpl* m_ptn0partitionImpl;
// Flag to indicate if Implementation object needs to be deleted
bool m_deleteImpl;
/**
* Name of the Business Object
*/
static std::string name;
/**
* Private default constructor. We do not want this class instantiated without the business object passed in.
* @param Ptn0Partition - desc for Ptn0Partition parameter
*/
Ptn0Partition( const Ptn0Partition& );
Ptn0Partition& operator=( const Ptn0Partition& );
friend class Ptn0PartitionDelegate;
friend class Ptn0PartitionDispatch;
friend class Ptn0PartitionGenImpl;
};
#include <ptn0partition/libptn0partition_undef.h>
#endif // TEAMCENTER__PARTITION__PTN0PARTITION__HXX