Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/XmlMDF_ADriver.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 2001-07-09
0002 // Created by: Julia DOROVSKIKH
0003 // Copyright (c) 2001-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _XmlMDF_ADriver_HeaderFile
0017 #define _XmlMDF_ADriver_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <TCollection_AsciiString.hxx>
0023 #include <Standard_Transient.hxx>
0024 #include <Standard_CString.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <XmlObjMgt_RRelocationTable.hxx>
0027 #include <XmlObjMgt_SRelocationTable.hxx>
0028 class Message_Messenger;
0029 class TDF_Attribute;
0030 class XmlObjMgt_Persistent;
0031 
0032 
0033 class XmlMDF_ADriver;
0034 DEFINE_STANDARD_HANDLE(XmlMDF_ADriver, Standard_Transient)
0035 
0036 //! Attribute Storage/Retrieval Driver.
0037 class XmlMDF_ADriver : public Standard_Transient
0038 {
0039 
0040 public:
0041 
0042   
0043   //! Returns the version number from which the driver
0044   //! is available.
0045   Standard_EXPORT virtual Standard_Integer VersionNumber() const;
0046   
0047   //! Creates a new attribute from TDF.
0048   Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const = 0;
0049   
0050   //! Returns the type of source object,
0051   //! inheriting from Attribute from TDF.
0052   Standard_EXPORT virtual Handle(Standard_Type) SourceType() const;
0053   
0054   //! Returns the full XML tag name (including NS prefix)
0055   Standard_EXPORT const TCollection_AsciiString& TypeName() const;
0056 
0057   //! Returns the namespace string
0058   const TCollection_AsciiString& Namespace() const { return myNamespace; }
0059 
0060   //! Translate the contents of <aSource> and put it
0061   //! into <aTarget>, using the relocation table
0062   //! <aRelocTable> to keep the sharings.
0063   Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& aSource, const Handle(TDF_Attribute)& aTarget, XmlObjMgt_RRelocationTable& aRelocTable) const = 0;
0064   
0065   //! Translate the contents of <aSource> and put it
0066   //! into <aTarget>, using the relocation table
0067   //! <aRelocTable> to keep the sharings.
0068   Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& aSource, XmlObjMgt_Persistent& aTarget, XmlObjMgt_SRelocationTable& aRelocTable) const = 0;
0069 
0070   //! Returns the current message driver of this driver
0071   const Handle(Message_Messenger)& MessageDriver() const { return myMessageDriver; }
0072 
0073   DEFINE_STANDARD_RTTIEXT(XmlMDF_ADriver,Standard_Transient)
0074 
0075 protected:
0076 
0077   Standard_EXPORT XmlMDF_ADriver(const Handle(Message_Messenger)& theMessageDriver, const Standard_CString theNamespace, const Standard_CString theName = NULL);
0078 
0079   TCollection_AsciiString myTypeName;
0080   TCollection_AsciiString myNamespace;
0081   Handle(Message_Messenger) myMessageDriver;
0082 
0083 private:
0084 
0085 friend class XmlMDF;
0086 
0087 };
0088 
0089 
0090 
0091 
0092 
0093 
0094 
0095 #endif // _XmlMDF_ADriver_HeaderFile