blob: 64b7645d7149c0a215b4ac59d908869c5da8dccb (
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
|
// File: XmlMDF_ADriverTable.cxx
// Created: 26.09.01 16:24:36
// Author: Julia DOROVSKIKH
// Copyright: Open Cascade 2001
// History:
#include <XmlMDF_ADriverTable.ixx>
//=======================================================================
//function : MDF_ADriverTable
//purpose :
//=======================================================================
XmlMDF_ADriverTable::XmlMDF_ADriverTable()
{}
//=======================================================================
//function : AddDriver
//purpose :
//=======================================================================
void XmlMDF_ADriverTable::AddDriver (const Handle(XmlMDF_ADriver)& anHDriver)
{
const Handle(Standard_Type)& type = anHDriver->SourceType();
// to make possible for applications to redefine standard attribute drivers
myMap.UnBind(type);
myMap.Bind(type,anHDriver);
}
//=======================================================================
//function : GetDrivers
//purpose :
//=======================================================================
const XmlMDF_TypeADriverMap& XmlMDF_ADriverTable::GetDrivers() const
{
return myMap;
}
//=======================================================================
//function : GetDriver
//purpose :
//=======================================================================
Standard_Boolean XmlMDF_ADriverTable::GetDriver
(const Handle(Standard_Type)& aType,
Handle(XmlMDF_ADriver)& anHDriver) const
{
if (myMap.IsBound(aType))
{
anHDriver = myMap.Find(aType);
return Standard_True;
}
return Standard_False;
}
|