LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
daf_persistence
11.0-1-g7418c06
src
StorageRegistry.cc
Go to the documentation of this file.
1
// -*- lsst-c++ -*-
2
3
/*
4
* LSST Data Management System
5
* Copyright 2008, 2009, 2010 LSST Corporation.
6
*
7
* This product includes software developed by the
8
* LSST Project (http://www.lsst.org/).
9
*
10
* This program is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
*
20
* You should have received a copy of the LSST License Statement and
21
* the GNU General Public License along with this program. If not,
22
* see <http://www.lsstcorp.org/LegalNotices/>.
23
*/
24
25
38
#ifndef __GNUC__
39
# define __attribute__(x)
/*NOTHING*/
40
#endif
41
static
char
const
* SVNid
__attribute__
((unused)) =
"$Id$"
;
42
43
#include "
lsst/daf/persistence/StorageRegistry.h
"
44
45
// Using LSST exceptions has problems due to the use of DataProperty, which is
46
// a Persistable, in them.
47
#include <stdexcept>
48
49
// All Storage subclasses must be included here.
50
51
#include "
lsst/daf/persistence/BoostStorage.h
"
52
#include "
lsst/daf/persistence/DbStorage.h
"
53
#include "
lsst/daf/persistence/DbTsvStorage.h
"
54
#include "
lsst/daf/persistence/FitsStorage.h
"
55
#include "
lsst/daf/persistence/XmlStorage.h
"
56
57
namespace
lsst {
58
namespace
daf {
59
namespace
persistence {
60
63
StorageRegistry::StorageRegistry
(
void
) {
64
// : lsst::daf::base::Citizen(typeid(this))
65
}
66
70
StorageRegistry::~StorageRegistry
(
void
) {
71
}
72
80
Storage::Ptr
StorageRegistry::createInstance
(std::string
const
&
name
) {
81
if
(name ==
"BoostStorage"
) {
82
return
Storage::Ptr
(
new
BoostStorage
);
83
}
84
else
if
(name ==
"DbStorage"
) {
85
return
Storage::Ptr
(
new
DbStorage
);
86
}
87
else
if
(name ==
"DbTsvStorage"
) {
88
return
Storage::Ptr
(
new
DbTsvStorage
);
89
}
90
else
if
(name ==
"FitsStorage"
) {
91
return
Storage::Ptr
(
new
FitsStorage
);
92
}
93
else
if
(name ==
"XmlStorage"
) {
94
return
Storage::Ptr
(
new
XmlStorage
);
95
}
96
else
throw
std::invalid_argument(
"Invalid storage type: "
+ name);
97
}
98
104
StorageRegistry
&
StorageRegistry::getRegistry
(
void
) {
105
static
StorageRegistry
*
registry
=
new
StorageRegistry
;
106
return
*
registry
;
107
}
108
109
}}}
// lsst::daf::persistence
lsst::daf::persistence::XmlStorage
Class for XML file storage.
Definition:
XmlStorage.h:57
name
table::Key< std::string > name
Definition:
ApCorrMap.cc:71
DbStorage.h
Interface for DbStorage class.
StorageRegistry.h
Interface for StorageRegistry class.
lsst::daf::persistence::FitsStorage
Class for FITS file storage.
Definition:
FitsStorage.h:52
FitsStorage.h
Interface for FitsStorage class.
lsst::daf::persistence::DbStorage
Class for database storage.
Definition:
DbStorage.h:63
lsst::daf::persistence::StorageRegistry::StorageRegistry
StorageRegistry(void)
Definition:
StorageRegistry.cc:63
XmlStorage.h
Interface for XmlStorage class.
DbTsvStorage.h
Interface for DbTsvStorage class.
lsst::daf::persistence::StorageRegistry
Class to register Storage subclasses.
Definition:
StorageRegistry.h:56
__attribute__
#define __attribute__(x)
Definition:
StorageRegistry.cc:39
lsst::daf::persistence::StorageRegistry::~StorageRegistry
~StorageRegistry(void)
Definition:
StorageRegistry.cc:70
lsst::daf::persistence::DbTsvStorage
Class for database storage with data loading from TSV files.
Definition:
DbTsvStorage.h:66
lsst::daf::persistence::Storage::Ptr
boost::shared_ptr< Storage > Ptr
Definition:
Storage.h:62
lsst::daf::persistence::BoostStorage
Class for boost::serialization storage.
Definition:
BoostStorage.h:58
lsst::daf::persistence::StorageRegistry::getRegistry
static StorageRegistry & getRegistry(void)
Definition:
StorageRegistry.cc:104
lsst::daf::persistence::StorageRegistry::createInstance
Storage::Ptr createInstance(std::string const &name)
Definition:
StorageRegistry.cc:80
lsst::pex.exceptions.wrappers.registry
dictionary registry
Definition:
wrappers.py:6
BoostStorage.h
Interface for BoostStorage class.
Generated on Thu Sep 24 2015 02:29:19 for LSSTApplications by
1.8.5