#include <DVLInfo.h>
|
| | DVLInfoBase (const std::type_info &tinfo, const std::type_info &elt_tinfo) |
| | Constructor.
|
| virtual | ~DVLInfoBase () |
| | Destructor.
|
| const std::type_info & | tinfo () const |
| | Return the type_info for the container.
|
| CLID | clid () const |
| | Return the CLID for the container.
|
| const std::type_info & | elt_tinfo () const |
| | Return the type_info for the container's element.
|
| virtual void * | make (size_t nreserve) const =0 |
| | Construct a new container.
|
| virtual void | push (void *cont_p, void *elt_p) const =0 |
| | Push a new pointer into the container.
|
| virtual size_t | size (void *cont_p) const =0 |
| | Return the size of the container.
|
| virtual void | clear (void *cont_p) const =0 |
| | Erase the elements in the container.
|
| virtual void | del (void *cont_p) const =0 |
| | Delete a container.
|
| virtual void * | clone (void *cont_p) const =0 |
| | Copy a container.
|
| virtual DVLIteratorBase * | iterator (const void *cont_p) const =0 |
| | Return a new iterator object.
|
| virtual SG::AuxVectorBase * | base (void *cont_p) const =0 |
| | Return a pointer to the container base.
|
|
| const std::type_info & | m_tinfo |
| | The type_info of the container.
|
| const std::type_info & | m_elt_tinfo |
| | The type_info of the container's element.
|
Definition at line 67 of file DVLInfo.h.
◆ DVLInfoBase()
| DataModel_detail::DVLInfoBase::DVLInfoBase |
( |
const std::type_info & | tinfo, |
|
|
const std::type_info & | elt_tinfo ) |
Constructor.
- Parameters
-
| tinfo | Type info object for the container being described. |
| elt_tinfo | Type info object for the element type of the container being described (with pointer and const's stripped.) |
Note: these objects should only be allocated statically.
Definition at line 59 of file DVLInfo.cxx.
63{
65 if (s_dvl_tinfo_map == 0)
67 (*s_dvl_tinfo_map)[&
tinfo] =
this;
68}
const std::type_info & elt_tinfo() const
Return the type_info for the container's element.
const std::type_info & m_elt_tinfo
The type_info of the container's element.
const std::type_info & tinfo() const
Return the type_info for the container.
const std::type_info & m_tinfo
The type_info of the container.
std::unordered_map< const std::type_info *, DVLInfoBase * > dvl_tinfo_map_t
Maps from tinfo pointers and CLID to DVLInfo instances.
◆ ~DVLInfoBase()
| virtual DataModel_detail::DVLInfoBase::~DVLInfoBase |
( |
| ) |
|
|
inlinevirtual |
◆ base()
| virtual SG::AuxVectorBase * DataModel_detail::DVLInfoBase::base |
( |
void * | cont_p | ) |
const |
|
pure virtual |
◆ clear()
| virtual void DataModel_detail::DVLInfoBase::clear |
( |
void * | cont_p | ) |
const |
|
pure virtual |
◆ clid()
| CLID DataModel_detail::DVLInfoBase::clid |
( |
| ) |
const |
Return the CLID for the container.
Definition at line 117 of file DVLInfo.cxx.
118{
120}
static CLID typeinfoToCLID(const std::type_info &ti)
Return the CLID corresponding to a type_info.
◆ clone()
| virtual void * DataModel_detail::DVLInfoBase::clone |
( |
void * | cont_p | ) |
const |
|
pure virtual |
◆ del()
| virtual void DataModel_detail::DVLInfoBase::del |
( |
void * | cont_p | ) |
const |
|
pure virtual |
◆ elt_tinfo()
| const std::type_info & DataModel_detail::DVLInfoBase::elt_tinfo |
( |
| ) |
const |
Return the type_info for the container's element.
(Pointer and const stripped.)
◆ find() [1/2]
Find the DVLInfo for the container clid.
Find the DVLInfo for the container tinfo.
- Parameters
-
| clid | CLID of the desired container. |
- Returns
- Pointer to the
DVLInfo, or 0 if not found.
- Parameters
-
| clid | CLID of the desired container. |
| tinfo | type_info of the desired container. |
- Returns
- Pointer to the
DVLInfo, or 0 if not found.
Definition at line 105 of file DVLInfo.cxx.
106{
108 if (ti)
110 return 0;
111}
static const std::type_info * CLIDToTypeinfo(CLID clid)
Translate between CLID and type_info.
static DVLInfoBase * find(const std::type_info &tinfo)
Find the DVLInfo for the container tinfo.
CLID clid() const
Return the CLID for the container.
◆ find() [2/2]
| DVLInfoBase * DataModel_detail::DVLInfoBase::find |
( |
const std::type_info & | tinfo | ) |
|
|
static |
Find the DVLInfo for the container tinfo.
- Parameters
-
| tinfo | type_info of the desired container. |
- Returns
- Pointer to the
DVLInfo, or 0 if not found.
Definition at line 76 of file DVLInfo.cxx.
77{
79 if (!s_dvl_tinfo_map)
80 return 0;
81 dvl_tinfo_map_t::iterator
i = s_dvl_tinfo_map->find (&
tinfo);
82 if (i != s_dvl_tinfo_map->end())
84 return 0;
85}
◆ iterator()
| virtual DVLIteratorBase * DataModel_detail::DVLInfoBase::iterator |
( |
const void * | cont_p | ) |
const |
|
pure virtual |
◆ make()
| virtual void * DataModel_detail::DVLInfoBase::make |
( |
size_t | nreserve | ) |
const |
|
pure virtual |
Construct a new container.
- Parameters
-
| nreserve | Number of elements for which to reserve space. (Ignored if not appropriate.) |
Implemented in DataModel_detail::DVLInfo< T >.
◆ push()
| virtual void DataModel_detail::DVLInfoBase::push |
( |
void * | cont_p, |
|
|
void * | elt_p ) const |
|
pure virtual |
Push a new pointer into the container.
- Parameters
-
| cont_p | Pointer to the container. |
| elt_p | Pointer to the element to push. (Must match the container's declared element type.) |
Implemented in DataModel_detail::DVLInfo< T >.
◆ size()
| virtual size_t DataModel_detail::DVLInfoBase::size |
( |
void * | cont_p | ) |
const |
|
pure virtual |
◆ tinfo()
| const std::type_info & DataModel_detail::DVLInfoBase::tinfo |
( |
| ) |
const |
Return the type_info for the container.
◆ m_elt_tinfo
| const std::type_info& DataModel_detail::DVLInfoBase::m_elt_tinfo |
|
private |
The type_info of the container's element.
Definition at line 185 of file DVLInfo.h.
◆ m_tinfo
| const std::type_info& DataModel_detail::DVLInfoBase::m_tinfo |
|
private |
The type_info of the container.
Definition at line 182 of file DVLInfo.h.
The documentation for this class was generated from the following files: