blob: 471687a3b387a944c6c2eb78be4e6308b9d46a8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
// File: XmlMDF_ADriver.cxx
// Created: Mon Jul 9 12:29:49 MSK DST 2001
// Author: Julia DOROVSKIKH
// Copyright: Matra Datavision 2001
#include <XmlMDF_ADriver.ixx>
//=======================================================================
//function : XmlMDF_ADriver
//purpose : Constructor
//=======================================================================
XmlMDF_ADriver::XmlMDF_ADriver (const Handle(CDM_MessageDriver)& theMsgDriver,
const Standard_CString theNS,
const Standard_CString theName)
: myMessageDriver (theMsgDriver)
{
if (theNS != NULL)
if (theNS[0] != '\0') {
myTypeName = theNS;
myTypeName += ':';
}
if (theName != NULL)
myTypeName += theName;
}
//=======================================================================
//function : VersionNumber
//purpose : default version number from which the driver is available
//=======================================================================
Standard_Integer XmlMDF_ADriver::VersionNumber () const
{
return 0;
}
//=======================================================================
//function : SourceType
//purpose :
//=======================================================================
Handle(Standard_Type) XmlMDF_ADriver::SourceType () const
{
return NewEmpty() -> DynamicType();
}
//=======================================================================
//function : TypeName
//purpose :
//=======================================================================
const TCollection_AsciiString& XmlMDF_ADriver::TypeName () const
{
const Standard_CString aString = myTypeName.ToCString();
if (myTypeName.Length() == 0 || aString [myTypeName.Length() - 1] == ':')
(TCollection_AsciiString&)myTypeName += SourceType() -> Name();
return myTypeName;
}
//=======================================================================
//function : WriteMessage
//purpose :
//=======================================================================
void XmlMDF_ADriver::WriteMessage
(const TCollection_ExtendedString& aMessage) const
{
myMessageDriver -> Write (aMessage.ToExtString());
}
|