16 Item(std::string
const & iname,
25 typedef std::map<std::string, int>
Lookup;
42 specs->indexes.insert(std::make_pair(
specs->items.back().name,(int)(
specs->items.size())-1));
43 return specs->items.size()-1;
57 size_t s =
specs->items.size();
59 for (
size_t i=0;
i<
s; ++
i) {
91 RecordSpecImpl::Lookup::const_iterator
p =
specs->indexes.find(iname);
92 return (p==
specs->indexes.end()) ? -1 : (*p).second;
97 return specs->items[
i].handler->type;
114 return specs->items[
i].name;
void const * get(int i) const
Item(std::string const &iname, TypeHandler const *ih)
virtual void destroy(AnyData &ad) const =0
void init(RecordSpec ispecs)
int index(std::string const &iname) const
std::string const & name(int i) const
void const * address(int i) const
TypeHandler const * handler
boost::shared_ptr< RecordSpecImpl > specs
std::vector< AnyData > m_field
size_t add(std::string const &name, std::type_info const &type)
std::vector< Item > items
std::type_info const * type(int i) const
std::map< std::string, int > Lookup
boost::shared_ptr< RecordSpecImpl > specs
virtual void create(AnyData &ad) const =0