VR-Vantage 2.5 API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
Tutorials
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
makArchives
DtSchema.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2008 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtSchema.h,v $ $Revision: 1.10 $ $State: Exp $
7
******************************************************************************/
8
11
12
#pragma once
13
14
#include <
makArchives/makArchives.h
>
15
#include <
makArchives/DtSchemaEntry.h
>
16
17
namespace
makArchives
18
{
22
class
DT_DLL_MAKARCHIVES
DtSchema
23
{
24
public
:
25
typedef
std::vector<DtSchemaEntry>
SchemaEntries
;
26
28
DtSchema
();
29
31
DtSchema
(
const
std::string
&
name
);
32
34
DtSchema
(
const
DtSchema
& copy);
35
37
virtual
~
DtSchema
();
38
40
DtSchema
& operator=(
const
DtSchema
& copy);
41
43
const
std::string
&
name
()
const
44
{
45
return
myName;
46
}
47
49
void
setName(
const
std::string
&
n
)
50
{
51
myName =
n
;
52
}
53
55
virtual
void
addSchemaEntry(
const
DtSchemaEntry
& entry);
56
59
virtual
bool
removeSchemaEntry(
const
std::string
&
name
);
60
62
const
SchemaEntries
& schemaEntries()
const
63
{
64
return
mySchemaEntries;
65
}
66
68
void
clear()
69
{
70
mySchemaEntries.clear();
71
}
72
74
void
setSchemaEntries(
const
SchemaEntries
& e)
75
{
76
mySchemaEntries = e;
77
}
78
81
DtSchemaEntry
* findSchemaEntry(
const
std::string
&
name
);
82
const
DtSchemaEntry
* findSchemaEntry(
const
std::string
&
name
)
const
;
83
87
virtual
void
merge(
const
DtSchema
& rhs);
88
90
virtual
bool
renameSchemaEntry(
const
std::string
& oldName,
const
std::string
& newName);
91
92
protected
:
93
94
friend
class
boost::serialization::access
;
95
99
100
template
<
typename
Archive>
101
void
serialize(Archive& ar,
unsigned
int
version)
102
{
103
ar & BOOST_SERIALIZATION_NVP(myName);
104
105
if
(version < 2)
106
{
107
int
myType;
108
ar & BOOST_SERIALIZATION_NVP(myType);
109
}
110
111
ar & BOOST_SERIALIZATION_NVP(mySchemaEntries);
112
}
113
115
static
bool
findSchemaEntryFunction(
const
DtSchemaEntry
& parameter,
const
std::string
&
name
);
116
117
protected
:
118
std::string
myName
;
119
SchemaEntries
mySchemaEntries
;
120
};
121
};
122
123
BOOST_CLASS_VERSION
(
makArchives::DtSchema
,2)
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)