39 # define __attribute__(x)
49 namespace persistence {
68 std::string
const& persistableName, std::type_info
const& persistableType,
70 _byName.insert(FactoryMap::value_type(persistableName, factory));
71 _nameForType.insert(StringMap::value_type(persistableType.name(),
82 std::type_info
const& persistableType,
84 StringMap::const_iterator it =
_nameForType.find(persistableType.name());
86 throw LSST_EXCEPT(lsst::pex::exceptions::InvalidParameterError,
87 std::string(
"No Formatter registered for Persistable type: ") +
88 persistableType.name());
100 std::string
const& persistableName,
102 FactoryMap::const_iterator it =
_byName.find(persistableName);
104 throw LSST_EXCEPT(lsst::pex::exceptions::InvalidParameterError,
105 "No Formatter registered for Persistable name: " +
109 if (policy && policy->exists(persistableName)) {
110 formatterPolicy = policy->getPolicy(persistableName);
112 return (*(it->second))(formatterPolicy);
118 lsst::daf::base::Citizen(typeid(*this)) {
boost::shared_ptr< Policy > Ptr
void markPersistent(void)
Mark a Citizen as persistent and not destroyed until process end.
#define LSST_EXCEPT(type,...)
Include files required for standard LSST Exception handling.