# DataExchange
TKSTEP
STEPConstruct

# STEPConstruct_ExternRefs Class Reference

Provides a tool for analyzing (reading) and creating (writing)
references to external files in STEP
.

`#include <STEPConstruct_ExternRefs.hxx>`

Inheritance diagram for STEPConstruct_ExternRefs:

[legend]

## Public Member Functions

void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | STEPConstruct_ExternRefs ()
| Creates an empty tool .
Standard_EXPORT | STEPConstruct_ExternRefs (const Handle(XSControl_WorkSession)&WS)
| Creates a tool and initializes it .
Standard_EXPORT Standard_Boolean | Init (const Handle(XSControl_WorkSession)&WS)
| Initializes tool; returns True if succeeded .
Standard_EXPORT void | Clear ()
| Clears internal fields (list of defined extern refs) .
Standard_EXPORT Standard_Boolean | LoadExternRefs ()
| Searches current STEP model for external references and loads them to the internal data structures NOTE: does not clear data structures before loading .
Standard_EXPORT Standard_Integer | NbExternRefs () const
| Returns number of defined extern references .
Standard_EXPORT const Standard_CString | FileName (const Standard_Integer num) const
| Returns filename for numth extern reference Returns Null if FileName is not defined or bad .
Standard_EXPORT Handle_StepBasic_ProductDefinition | ProdDef (const Standard_Integer num) const
| Returns ProductDefinition to which numth extern reference is associated. Returns Null if cannot be detected or if extern reference is not associated to SDR in a proper way. .
Standard_EXPORT Handle_TCollection_HAsciiString | Format (const Standard_Integer num) const
| Returns format identification string for the extern document Returns Null handle if format is not defined .
Standard_EXPORT Standard_Integer | AddExternRef (const Standard_CString filename, const Handle(StepBasic_ProductDefinition)&PD, const Standard_CString format)
| Create a new external reference with specified attributes attached to a given SDR <format> can be Null string, in that case this information is not written. Else, it can be "STEP AP214" or "STEP AP203" Returns index of a new extern ref .
Standard_EXPORT void | checkAP214Shared ()
| Check (create if it is null) all shared entities for the model .
Standard_EXPORT Standard_Integer | WriteExternRefs (const Standard_Integer num) const
| Adds all the currently defined external refs to the model Returns number of written extern refs .
Standard_EXPORT void | SetAP214APD (const Handle(StepBasic_ApplicationProtocolDefinition)&APD)
| Set the ApplicationProtocolDefinition of the PDM schema .
Standard_EXPORT Handle_StepBasic_ApplicationProtocolDefinition | GetAP214APD ()
| Returns the ApplicationProtocolDefinition of the PDM schema NOTE: if not defined then create new APD with new Application Context .

## Protected Member Functions

Standard_EXPORT Standard_Boolean | addAP214ExterRef (const Handle(StepAP214_AppliedDocumentReference)&ADR, const Handle(StepBasic_ProductDefinition)&PD, const Handle(StepBasic_DocumentFile)&DF, const Standard_CString filename)
| Create a new additional structure entities and add ncessary references Note: do not refer from ADR to DF directly in AP214 (TRJ11). .

## Private Attributes

TColStd_SequenceOfTransient | myAEIAs
TColStd_SequenceOfTransient | myRoles
TColStd_SequenceOfTransient | myFormats
TColStd_SequenceOfTransient | myShapes
TColStd_SequenceOfTransient | myTypes
TColStd_SequenceOfInteger | myIsAP214
TColStd_SequenceOfInteger | myReplaceNum
TColStd_SequenceOfTransient | myDocFiles
Handle_StepBasic_ProductRelatedProductCategory | mySharedPRPC
Handle_StepBasic_DocumentType | mySharedDocType
Handle_StepBasic_ProductDefinitionContext | mySharedPDC
Handle_StepBasic_ProductContext | mySharedPC
Handle_StepBasic_ApplicationProtocolDefinition | myAPD

## Constructor & Destructor Documentation

Standard_EXPORT STEPConstruct_ExternRefs::STEPConstruct_ExternRefs | ( |  | ) |

Standard_EXPORT STEPConstruct_ExternRefs::STEPConstruct_ExternRefs | ( | const Handle(XSControl_WorkSession)& | WS | ) |

## Member Function Documentation

Standard_EXPORT Standard_Boolean STEPConstruct_ExternRefs::addAP214ExterRef | ( | const Handle(StepAP214_AppliedDocumentReference)& | ADR,
|  | const Handle(StepBasic_ProductDefinition)& | PD,
|  | const Handle(StepBasic_DocumentFile)& | DF,
|  | const Standard_CString | filename
| ) | `[protected]`

Standard_EXPORT Standard_Integer STEPConstruct_ExternRefs::AddExternRef | ( | const Standard_CString | filename,
|  | const Handle(StepBasic_ProductDefinition)& | PD,
|  | const Standard_CString | format
| ) |

Standard_EXPORT void STEPConstruct_ExternRefs::checkAP214Shared | ( |  | ) |

Standard_EXPORT void STEPConstruct_ExternRefs::Clear | ( |  | ) |

Standard_EXPORT const Standard_CString STEPConstruct_ExternRefs::FileName | ( | const Standard_Integer | num | ) | const

Standard_EXPORT Handle_TCollection_HAsciiString STEPConstruct_ExternRefs::Format | ( | const Standard_Integer | num | ) | const

Standard_EXPORT Handle_StepBasic_ApplicationProtocolDefinition STEPConstruct_ExternRefs::GetAP214APD | ( |  | ) |

Standard_EXPORT Standard_Boolean STEPConstruct_ExternRefs::Init | ( | const Handle(XSControl_WorkSession)& | WS | ) |

Standard_EXPORT Standard_Boolean STEPConstruct_ExternRefs::LoadExternRefs | ( |  | ) |

Standard_EXPORT Standard_Integer STEPConstruct_ExternRefs::NbExternRefs | ( |  | ) | const

void STEPConstruct_ExternRefs::operator delete | ( | void * | anAddress | ) | `[inline]`

| Reimplemented from STEPConstruct_Tool.

void* STEPConstruct_ExternRefs::operator new | ( | size_t | size | ) | `[inline]`

| Reimplemented from STEPConstruct_Tool.

void* STEPConstruct_ExternRefs::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

| Reimplemented from STEPConstruct_Tool.

Standard_EXPORT Handle_StepBasic_ProductDefinition STEPConstruct_ExternRefs::ProdDef | ( | const Standard_Integer | num | ) | const

Standard_EXPORT void STEPConstruct_ExternRefs::SetAP214APD | ( | const Handle(StepBasic_ApplicationProtocolDefinition)& | APD | ) |

Standard_EXPORT Standard_Integer STEPConstruct_ExternRefs::WriteExternRefs | ( | const Standard_Integer | num | ) | const

## Field Documentation

TColStd_SequenceOfTransient STEPConstruct_ExternRefs::myAEIAs`[private]`

Handle_StepBasic_ApplicationProtocolDefinition STEPConstruct_ExternRefs::myAPD`[private]`

TColStd_SequenceOfTransient STEPConstruct_ExternRefs::myDocFiles`[private]`

TColStd_SequenceOfTransient STEPConstruct_ExternRefs::myFormats`[private]`

TColStd_SequenceOfInteger STEPConstruct_ExternRefs::myIsAP214`[private]`

TColStd_SequenceOfInteger STEPConstruct_ExternRefs::myReplaceNum`[private]`

TColStd_SequenceOfTransient STEPConstruct_ExternRefs::myRoles`[private]`

TColStd_SequenceOfTransient STEPConstruct_ExternRefs::myShapes`[private]`

Handle_StepBasic_DocumentType STEPConstruct_ExternRefs::mySharedDocType`[private]`

Handle_StepBasic_ProductContext STEPConstruct_ExternRefs::mySharedPC`[private]`

Handle_StepBasic_ProductDefinitionContext STEPConstruct_ExternRefs::mySharedPDC`[private]`

Handle_StepBasic_ProductRelatedProductCategory STEPConstruct_ExternRefs::mySharedPRPC`[private]`

TColStd_SequenceOfTransient STEPConstruct_ExternRefs::myTypes`[private]`

The documentation for this class was generated from the following file:

- STEPConstruct_ExternRefs.hxx