VR-Vantage 2.7 API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
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
8
9
#pragma once
10
11
#include <
makArchives/makArchives.h
>
12
#include <
makArchives/DtSchemaEntry.h
>
13
14
namespace
makArchives
15
{
19
class
DT_DLL_MAKARCHIVES
DtSchema
20
{
21
public
:
22
typedef
std::vector<DtSchemaEntry>
SchemaEntries
;
23
25
DtSchema
();
26
28
DtSchema
(
const
std::string
&
name
);
29
31
DtSchema
(
const
DtSchema
& copy);
32
34
virtual
~
DtSchema
();
35
37
DtSchema
& operator=(
const
DtSchema
& copy);
38
40
const
std::string
&
name
()
const
41
{
42
return
myName;
43
}
44
46
void
setName(
const
std::string
&
n
)
47
{
48
myName =
n
;
49
}
50
52
virtual
void
addSchemaEntry(
const
DtSchemaEntry
& entry);
53
56
virtual
bool
removeSchemaEntry(
const
std::string
&
name
);
57
59
const
SchemaEntries
& schemaEntries()
const
60
{
61
return
mySchemaEntries;
62
}
63
65
void
clear()
66
{
67
mySchemaEntries.clear();
68
}
69
71
void
setSchemaEntries(
const
SchemaEntries
&
e
)
72
{
73
mySchemaEntries =
e
;
74
}
75
78
DtSchemaEntry
* findSchemaEntry(
const
std::string
&
name
);
79
const
DtSchemaEntry
* findSchemaEntry(
const
std::string
&
name
)
const
;
80
84
virtual
void
merge(
const
DtSchema
& rhs);
85
87
virtual
bool
renameSchemaEntry(
const
std::string
& oldName,
const
std::string
& newName);
88
89
protected
:
90
91
friend
class
boost::serialization::access
;
92
96
97
template
<
typename
Archive>
98
void
serialize(Archive& ar,
unsigned
int
version
)
99
{
100
ar & BOOST_SERIALIZATION_NVP(myName);
101
102
if
(version < 2)
103
{
104
int
myType;
105
ar & BOOST_SERIALIZATION_NVP(myType);
106
}
107
108
ar & BOOST_SERIALIZATION_NVP(mySchemaEntries);
109
}
110
112
static
bool
findSchemaEntryFunction(
const
DtSchemaEntry
& parameter,
const
std::string
&
name
);
113
114
protected
:
115
std::string
myName
;
116
SchemaEntries
mySchemaEntries
;
117
};
118
};
119
120
BOOST_CLASS_VERSION
(
makArchives::DtSchema
,2)
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (
www.mak.com
)