OCC Main Page | ApplicationFramework | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

ApplicationFramework
TKLCAF
TDocStd


TDocStd_XLinkTool Class Reference

This tool class is used to copy the content of
source label under target label. Only child
labels and attributes of source are copied.
attributes located out of source scope are not
copied by this algorithm.
Depending of the called method an external
reference is set in the the target document to
registred the externallink.
Warning: Nothing is provided in this class about the
opportunity to copy, set a link or update it.
Such decisions must be under application control
.

#include <TDocStd_XLinkTool.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT TDocStd_XLinkTool ()
Standard_EXPORT void CopyWithLink (const TDF_Label &intarget, const TDF_Label &fromsource)
 Copies the content of the label <fromsource> to the label <intarget>.
The link is registred with an XLink attribute by <intarget>
label. if the content of <fromsource> is not
self-contained, and/or <intarget> has already an XLink
attribute, an exception is raised.
.
Standard_EXPORT void UpdateLink (const TDF_Label &L)
 Update the external reference set at <l>.
Example
Handle(TDocStd_Document) aDoc;
if
(!OCAFTest::GetDocument(1,aDoc)) return 1;
Handle(TDataStd_Reference) aRef;
TDocStd_XLinkTool xlinktool;
if
(!OCAFTest::Find(aDoc,2),TDataStd_Reference::GetID(),aRef) return 1;
xlinktool.UpdateLink(aRef->Label());
Exceptions
Standard_DomainError if <l> has no XLink attribute.
.
Standard_EXPORT void Copy (const TDF_Label &intarget, const TDF_Label &fromsource)
 Copy the content of <fromsource> under
<intarget>. Noone link is registred. noone check is done.
Example
Handle(TDocStd_Document) DOC, XDOC;
TDF_Label L, XL;
TDocStd_XLinkTool xlinktool;
xlinktool.Copy(L,XL);
Exceptions
Standard_DomainError if the contents of
fromsource are not entirely in the scope of this
label, in other words, are not self-contained.
.
Standard_EXPORT Standard_Boolean IsDone () const
Standard_EXPORT Handle_TDF_DataSet DataSet () const
Standard_EXPORT Handle_TDF_RelocationTable RelocationTable () const

Private Attributes

Standard_Boolean isDone
Handle_TDF_DataSet myDS
Handle_TDF_RelocationTable myRT


Constructor & Destructor Documentation

Standard_EXPORT TDocStd_XLinkTool::TDocStd_XLinkTool  ) 
 


Member Function Documentation

Standard_EXPORT void TDocStd_XLinkTool::Copy const TDF_Label intarget,
const TDF_Label fromsource
 

Standard_EXPORT void TDocStd_XLinkTool::CopyWithLink const TDF_Label intarget,
const TDF_Label fromsource
 

Standard_EXPORT Handle_TDF_DataSet TDocStd_XLinkTool::DataSet  )  const
 

Standard_EXPORT Standard_Boolean TDocStd_XLinkTool::IsDone  )  const
 

void TDocStd_XLinkTool::operator delete void *  anAddress  )  [inline]
 

void* TDocStd_XLinkTool::operator new size_t  size  )  [inline]
 

void* TDocStd_XLinkTool::operator new size_t  ,
void *  anAddress
[inline]
 

Standard_EXPORT Handle_TDF_RelocationTable TDocStd_XLinkTool::RelocationTable  )  const
 

Standard_EXPORT void TDocStd_XLinkTool::UpdateLink const TDF_Label L  ) 
 


Field Documentation

Standard_Boolean TDocStd_XLinkTool::isDone [private]
 

Handle_TDF_DataSet TDocStd_XLinkTool::myDS [private]
 

Handle_TDF_RelocationTable TDocStd_XLinkTool::myRT [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 14:15:37 2008 for OpenCASCADE by  doxygen 1.4.1