// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _TDocStd_XLinkTool_HeaderFile #define _TDocStd_XLinkTool_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Handle_TDF_DataSet_HeaderFile #include #endif #ifndef _Handle_TDF_RelocationTable_HeaderFile #include #endif class TDF_DataSet; class TDF_RelocationTable; class TDF_Label; //! 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.
//! Warning1: Nothing is provided in this class about the
//! opportunity to copy, set a link or update it.
//! Such decisions must be under application control.
//! Warning2: If the document manages shapes, use after copy
//! TNaming::ChangeShapes(target,M) to make copy of
//! shapes.
class TDocStd_XLinkTool { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } Standard_EXPORT TDocStd_XLinkTool(); //! Copies the content of the label to the label .
//! The link is registred with an XLink attribute by
//! label. if the content of is not
//! self-contained, and/or has already an XLink
//! attribute, an exception is raised.
Standard_EXPORT void CopyWithLink(const TDF_Label& intarget,const TDF_Label& fromsource) ; //! Update the external reference set at .
//! 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 has no XLink attribute.
Standard_EXPORT void UpdateLink(const TDF_Label& L) ; //! Copy the content of under
//! . 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.
//! !!! ==> Warning:
//! If the document manages shapes use the next way:
//! TDocStd_XLinkTool xlinktool;
//! xlinktool.Copy(L,XL);
//! TopTools_DataMapOfShapeShape M;
//! TNaming::ChangeShapes(target,M);
Standard_EXPORT virtual void Copy(const TDF_Label& intarget,const TDF_Label& fromsource) ; Standard_EXPORT Standard_Boolean IsDone() const; Standard_EXPORT Handle_TDF_DataSet DataSet() const; Standard_EXPORT Handle_TDF_RelocationTable RelocationTable() const; protected: Standard_Boolean isDone; private: Handle_TDF_DataSet myDS; Handle_TDF_RelocationTable myRT; }; // other Inline functions and methods (like "C++: function call" methods) #endif