CATPLMIntegrationUse CATAdpPLMGenealogy
Usage: you must use this class as is. You should never derive it.
public class CATAdpPLMGenealogy
class to retrieve genealogy informations on components.
Role: Provide a way to retrieve genealogy informations on components
CATListPtrCATIAdpPLMIdentificator ListCAAComponents = .....;
CATAdpPLMGenealogy genealogy(ListCAAComponents);
CATAdpPLMGenealogyInformation info;
CATAdpPLMGenealogyInformationIter iter;
// retrieve children on input components ....
if (SUCCEEDED(genealogy.GetChildren(iter)))
{
while(S_OK == iter.NextInfos(info))
{
CATIAdpPLMIdentificator * pIdInput=NULL;
CATAdpPLMLifecycleOperation::Operation operation;
CATIAdpPLMIdentificator * pIdRelated=NULL;
if (SUCCEEDED(info.GetInput(pIdInput)) && NULL != pIdInput && SUCCEEDED(info.GetOperation(operation)) && SUCCEEDED(info.GetRelated(pIdRelated)))
{
if (operation == CATAdpPLMLifecycleOperation::Duplicate)
{
// component of Id pIdRelated is a clone of component of Id pIdInput
.....
}
else if (operation == CATAdpPLMLifecycleOperation::NoOperation)
{
// pIdRelated must be null . component of Id pIdInput has no child.
}
else if (operation == .....
.....
}
CATSysReleasePtr(pIdInput);
CATSysReleasePtr(pIdRelated);
}
else // error management ...
}
else // error management ...
// retrieve ancestors on input components ....
if (SUCCEEDED(genealogy.GetAncestors(iter)))
{
while(S_OK == iter.NextInfos(info))
{
CATIAdpPLMIdentificator * pIdInput=NULL;
CATAdpPLMLifecycleOperation::Operation operation;
CATIAdpPLMIdentificator * pIdRelated=NULL;
if (SUCCEEDED(info.GetInput(pIdInput)) && NULL != pIdInput && SUCCEEDED(info.GetOperation(operation)) && SUCCEEDED(info.GetRelated(pIdRelated)))
{
if (operation == CATAdpPLMLifecycleOperation::Duplicate)
{
// component of Id pIdInput is a clone of component of Id pIdRelated
.....
}
else if (operation == CATAdpPLMLifecycleOperation::NoOperation)
{
// pIdRelated must be null . component of Id pIdInput has no ancestor.
}
else if (operation == .....
.....
}
else // error management ...
CATSysReleasePtr(pIdInput);
CATSysReleasePtr(pIdRelated);
}
}
else // error management ...
Constructor and Destructor Index
- o
CATAdpPLMGenealogy(CATIAdpPLMIdentificator*,CATIAdpPLMErrorReviewer*)
- Set the input component to get the child(ren) and/or the ancestor of this component
Role: Constructor
- o
CATAdpPLMGenealogy(CATListPtrCATIAdpPLMIdentificator&,CATIAdpPLMErrorReviewer*)
- Set the input list of components to get the child(ren) and/or the ancestor(s) of these components
Role: Constructor
- o
~CATAdpPLMGenealogy()
-
Method Index
- o
GetAncestor(CATIAdpPLMIdentificator*,CATAdpPLMGenealogyInformation&)
- Get every ancestor of input components
Role: Make a query (if not already done) to generate the list of each input component
and its related (ancestor) element, and the operation leading to the related element.
- o
GetAncestors(CATAdpPLMGenealogyInformationIter&)
- Get every ancestor of input components
Role: Make a query (if not already done) to generate the list of each input component
and its related (ancestor) element, and the operation leading to the related element.
- o
GetChildren(CATAdpPLMGenealogyInformationIter&)
- Get every children of input components
Role: Make a query (if not already done) to generate the list of each input component
and its related (child) element(s), and the operation leading to the related element.
- o
GetChildren(CATIAdpPLMIdentificator*,CATAdpPLMGenealogyInformationIter&)
- Get every children of input component
Role: Make a query (if not already done) to generate the list of each input component
and its related (child) element(s), and the operation leading to the related element.
- o
GetInnerRelated(CATIAdpPLMIdentificator*,CATIAdpPLMIdentificator*,CATAdpPLMGenealogyInformation&)
- Get the relation between two components given in input, provided it exists
Role: Make a query (if not already done) to generate the list of each input component
and its related (ancestor) element, and the operation leading to the related element.
Constructor and Destructor
o CATAdpPLMGenealogy
public CATAdpPLMGenealogy( | | iComponent, |
| | iErrorReviewer | = NULL) |
-
Set the input component to get the child(ren) and/or the ancestor of this component
Role: Constructor
- Parameters:
-
- iComponent
- Component identificator on which query(ies) will be process to retrieve parents. The component may be a reference or a representation reference only.
Query(ies) will be process in order to retrieve parents or children of this component when using the
,
,
methods.
- ioMonitor
- The ErrorMonitor dedicated to store and handle all PLM Errors raised during the execution of this service.
o CATAdpPLMGenealogy
public CATAdpPLMGenealogy( | const | iComponents, |
| | iErrorReviewer | = NULL) |
-
Set the input list of components to get the child(ren) and/or the ancestor(s) of these components
Role: Constructor
- Parameters:
-
- iComponents
- The list of components . Each component may be a reference or a representation reference only. Query (ies) will be process in order
to retrieve parents or children of these components when using the
,
,
methods.
- ioMonitor
- The ErrorMonitor dedicated to store and handle all PLM Errors raised during the execution of this service.
o ~CATAdpPLMGenealogy
public virtual ~CATAdpPLMGenealogy( | ) |
-
Methods
o GetAncestor
public GetAncestor( | | iKey, |
| | oData) |
-
Get every ancestor of input components
Role: Make a query (if not already done) to generate the list of each input component
and its related (ancestor) element, and the operation leading to the related element.
The query is generated once. See
for the structure. Then returns only the ancestor of the method's input component.
It's possible to call other methods after this one.
- Parameters:
-
- &oData
- CATAdpPLMGenealogyInformation corresponding to found element if found. See
The order is : input, lifecycle operation relating the two elements, related is ancestor
- Returns:
-
S_OK
Operation was successful -
S_FALSE
- No ancestor found, return parameter is not valid
E_FAIL
An error was encountered. See the error monitor-
o GetAncestors
public GetAncestors( | | oData) |
-
Get every ancestor of input components
Role: Make a query (if not already done) to generate the list of each input component
and its related (ancestor) element, and the operation leading to the related element.
The query is generated once. See
for the structure. It's possible to call other methods after this one.
- Parameters:
-
- &oData
- Iterator on the return set. See
elements not found are linken like this : input, NoOperation, NULL
The order is, for each element : input, lifecycle operation relating the two elements, related is ancestor
- Returns:
-
S_OK
Operation was successful -
S_FALSE
- No ancestors
E_FAIL
An error was encountered. See the error monitor-
o GetChildren
public GetChildren( | | oData) |
-
Get every children of input components
Role: Make a query (if not already done) to generate the list of each input component
and its related (child) element(s), and the operation leading to the related element.
The query is generated once. See
to retrieve these informations. Input can be found many times if multiple descendants were created.
It's possible to call other methods after this one.
- Parameters:
-
- &oData
- Iterator on the return set. See
elements not found are linken like this : input, NoOperation, NULL
The order is, for each element : input, lifecycle operation relating the two elements, related is child
- Returns:
-
S_OK
Operation was successful -
S_FALSE
- No children
E_FAIL
An error was encountered. See the error monitor-
o GetChildren
public GetChildren( | | iKey, |
| | oData) |
-
Get every children of input component
Role: Make a query (if not already done) to generate the list of each input component
and its related (child) element(s), and the operation leading to the related element.
The query is generated once. See
for the structure. Then returns only the children iterator of the method's input component.
Input can be found many times if multiple descendants were created.
It's possible to call other methods after this one.
- Parameters:
-
- &oData
- Iterator on the return set if any found. See
The order is, for each element : input, lifecycle operation relating the two elements, related is child
- Returns:
-
S_OK
Operation was successful -
S_FALSE
- No children, iterator is not populated by the method
E_FAIL
An error was encountered. See the error monitor-
o GetInnerRelated
public GetInnerRelated( | | iFirst, |
| | iSecond, |
| | oData) |
-
Get the relation between two components given in input, provided it exists
Role: Make a query (if not already done) to generate the list of each input component
and its related (ancestor) element, and the operation leading to the related element.
The query is generated once. See
for the structure. Then returns only the ancestor of the method's input couple.
Query is the same as GetAncestors but only components given to constructor are bound to be taken into account.
Search is done two ways, but result is always from child to ancestor.
It's possible to call other methods after this one.
- Parameters:
-
- &oData
- CATAdpPLMGenealogyInformation corresponding to found element if found. See
The order is : input, lifecycle operation relating the two elements, related is *always* ancestor
- Returns:
-
S_OK
Operation was successful -
S_FALSE
- No relation found, return parameter is not valid
E_FAIL
An error was encountered. See the error monitor-
E_INVALIDARG
One of the requested elements is not in input-
This object is included in the file: CATAdpPLMGenealogy.h
If needed, your Imakefile.mk should include the module: CATPLMIntegrationUse
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.