0031353: TDocStd_Application does not have api to set progress indicator
[occt.git] / src / XmlMDF / XmlMDF_ADriver.hxx
CommitLineData
42cf5bc1 1// Created on: 2001-07-09
2// Created by: Julia DOROVSKIKH
3// Copyright (c) 2001-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _XmlMDF_ADriver_HeaderFile
17#define _XmlMDF_ADriver_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
22#include <TCollection_AsciiString.hxx>
25e59720 23#include <Standard_Transient.hxx>
42cf5bc1 24#include <Standard_CString.hxx>
25#include <Standard_Integer.hxx>
26#include <Standard_Type.hxx>
27#include <Standard_Boolean.hxx>
28#include <XmlObjMgt_RRelocationTable.hxx>
29#include <XmlObjMgt_SRelocationTable.hxx>
83ae3591 30class Message_Messenger;
42cf5bc1 31class TDF_Attribute;
32class TCollection_AsciiString;
33class XmlObjMgt_Persistent;
34class TCollection_ExtendedString;
35
36
37class XmlMDF_ADriver;
25e59720 38DEFINE_STANDARD_HANDLE(XmlMDF_ADriver, Standard_Transient)
42cf5bc1 39
40//! Attribute Storage/Retrieval Driver.
25e59720 41class XmlMDF_ADriver : public Standard_Transient
42cf5bc1 42{
43
44public:
45
46
47 //! Returns the version number from which the driver
48 //! is available.
49 Standard_EXPORT virtual Standard_Integer VersionNumber() const;
50
51 //! Creates a new attribute from TDF.
52 Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const = 0;
53
54 //! Returns the type of source object,
55 //! inheriting from Attribute from TDF.
56 Standard_EXPORT Handle(Standard_Type) SourceType() const;
57
58 //! Returns the full XML tag name (including NS prefix)
59 Standard_EXPORT const TCollection_AsciiString& TypeName() const;
60
61 //! Translate the contents of <aSource> and put it
62 //! into <aTarget>, using the relocation table
63 //! <aRelocTable> to keep the sharings.
64 Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& aSource, const Handle(TDF_Attribute)& aTarget, XmlObjMgt_RRelocationTable& aRelocTable) const = 0;
65
66 //! Translate the contents of <aSource> and put it
67 //! into <aTarget>, using the relocation table
68 //! <aRelocTable> to keep the sharings.
69 Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& aSource, XmlObjMgt_Persistent& aTarget, XmlObjMgt_SRelocationTable& aRelocTable) const = 0;
42cf5bc1 70
25e59720 71 DEFINE_STANDARD_RTTIEXT(XmlMDF_ADriver,Standard_Transient)
42cf5bc1 72
73protected:
74
83ae3591 75 Standard_EXPORT XmlMDF_ADriver(const Handle(Message_Messenger)& theMessageDriver, const Standard_CString theNamespace, const Standard_CString theName = NULL);
42cf5bc1 76
77 TCollection_AsciiString myTypeName;
78
83ae3591 79 Handle(Message_Messenger) myMessageDriver;
42cf5bc1 80
81private:
82
83ae3591 83friend class XmlMDF;
42cf5bc1 84
85};
86
87
88
89
90
91
92
93#endif // _XmlMDF_ADriver_HeaderFile