The tendrils are a collection for the ecto::tendril class, addressable by a string key.
More...
#include <tendrils.hpp>
|
| | tendrils () |
| |
| iterator | begin () |
| |
| const_iterator | begin () const |
| |
| iterator | end () |
| |
| const_iterator | end () const |
| |
| iterator | find (const std::string &name) |
| |
| const_iterator | find (const std::string &name) const |
| |
| void | clear () |
| |
| size_type | size () const |
| |
| size_type | count (const std::string &name) const |
| |
| void | erase (iterator pos) |
| |
| void | erase (const key_type &k) |
| |
| template<typename InputIterator > |
| void | insert (InputIterator first, InputIterator last) |
| |
| std::pair< iterator, bool > | insert (const value_type &v) |
| |
| key_compare | key_comp () const |
| |
| template<typename T > |
| spore< T > | declare (const std::string &name) |
| | Declare a tendril of a certain type, with only a name, no doc, or default values. More...
|
| |
| template<typename T > |
| spore< T > | declare (const std::string &name, const std::string &doc) |
| |
| template<typename T > |
| spore< T > | declare (const std::string &name, const std::string &doc, const T &default_val) |
| |
| template<typename T , typename CellImpl > |
| spore< T > | declare (spore< T > CellImpl::*ptm, const std::string &name, const std::string &doc="", const typename spore< T >::value_type &default_val=typename spore< T >::value_type()) |
| |
| template<typename Impl > |
| void | realize_potential (Impl *cookie) |
| |
| tendril_ptr | declare (const std::string &name, tendril_ptr t) |
| |
| template<typename T > |
| T & | get (const std::string &name) const |
| | get the given type that is stored at the given key. Will throw if there is a type mismatch. More...
|
| |
| const tendril_ptr & | operator[] (const std::string &name) const |
| | Grabs the tendril at the key. More...
|
| |
| tendril_ptr & | operator[] (const std::string &name) |
| |
| void | print_doc (std::ostream &out, const std::string &tendrils_name) const |
| | Print the tendrils documentation string, in rst format. More...
|
| |
| template<class Archive > |
| void | serialize (Archive &ar, const unsigned int) |
| |
|
| typedef boost::signals2::signal< void(void *, const tendrils *)> | sig_t |
| |
The tendrils are a collection for the ecto::tendril class, addressable by a string key.
| ecto::tendrils::tendrils |
( |
| ) |
|
| ecto::tendrils::tendrils |
( |
const tendrils & |
| ) |
|
|
private |
| void ecto::tendrils::clear |
( |
| ) |
|
|
inline |
| size_type ecto::tendrils::count |
( |
const std::string & |
name | ) |
const |
|
inline |
template<typename T >
| spore<T> ecto::tendrils::declare |
( |
const std::string & |
name | ) |
|
|
inline |
Declare a tendril of a certain type, with only a name, no doc, or default values.
- Template Parameters
-
| T | the type of tendril to declare. |
- Parameters
-
| name | The key for the tendril. Must be unique. |
- Returns
- A typed holder for the tendril.
template<typename T >
| spore<T> ecto::tendrils::declare |
( |
const std::string & |
name, |
|
|
const std::string & |
doc |
|
) |
| |
|
inline |
template<typename T >
| spore<T> ecto::tendrils::declare |
( |
const std::string & |
name, |
|
|
const std::string & |
doc, |
|
|
const T & |
default_val |
|
) |
| |
|
inline |
- See also
- tendrils::declare
- Parameters
-
| name | The key for the tendril. Must be unique. |
| doc | The doc string for the tendril. |
| default_val | A default value for the tendril. |
- Returns
- See also
- tendrils::declare
template<typename T , typename CellImpl >
| spore<T> ecto::tendrils::declare |
( |
spore< T > CellImpl::* |
ptm, |
|
|
const std::string & |
name, |
|
|
const std::string & |
doc = "", |
|
|
const typename spore< T >::value_type & |
default_val = typename spore<T>::value_type() |
|
) |
| |
|
inline |
Sig is a function object that looks like: struct Callback { typedef void result_type; void operator()(const boost::signals2::connection &conn, void* cookie, const tendrils* tdls) const { conn.disconnect();//for one time callbacks do your thang. } };
This will be called by realize_potential(cookie). Typically cookie is of type CellImplementation.
Convenience function for static registration of pointer to members that are of type spore<T>
Runtime declare function.
- Parameters
-
- Returns
| void ecto::tendrils::doesnt_exist |
( |
const std::string & |
name | ) |
const |
|
private |
| void ecto::tendrils::erase |
( |
iterator |
pos | ) |
|
|
inline |
| void ecto::tendrils::erase |
( |
const key_type & |
k | ) |
|
|
inline |
| iterator ecto::tendrils::find |
( |
const std::string & |
name | ) |
|
|
inline |
template<typename T >
| T& ecto::tendrils::get |
( |
const std::string & |
name | ) |
const |
|
inline |
get the given type that is stored at the given key. Will throw if there is a type mismatch.
- Template Parameters
-
| T | The compile time type to attempt to get from the tendrils. |
- Parameters
-
- Returns
- A reference to the value, no copy is done.
template<typename InputIterator >
| void ecto::tendrils::insert |
( |
InputIterator |
first, |
|
|
InputIterator |
last |
|
) |
| |
|
inline |
| const tendril_ptr& ecto::tendrils::operator[] |
( |
const std::string & |
name | ) |
const |
Grabs the tendril at the key.
- Parameters
-
| name | The key for the desired tendril. |
- Returns
- A shared pointer to the tendril. this throws if the key is not in the tendrils object
| tendril_ptr& ecto::tendrils::operator[] |
( |
const std::string & |
name | ) |
|
| void ecto::tendrils::print_doc |
( |
std::ostream & |
out, |
|
|
const std::string & |
tendrils_name |
|
) |
| const |
Print the tendrils documentation string, in rst format.
- Parameters
-
| out | The stream to print to. |
| tendrils_name | The name used as a label, for the tendrils. |
template<typename Impl >
| void ecto::tendrils::realize_potential |
( |
Impl * |
cookie | ) |
|
|
inline |
template<class Archive >
| void ecto::tendrils::serialize |
( |
Archive & |
ar, |
|
|
const unsigned |
int |
|
) |
| |
| sig_t ecto::tendrils::static_bindings_ |
|
private |
The documentation for this class was generated from the following file:
- /home/vrabaud/workspace/recognition_kitchen/src/ecto/include/ecto/tendrils.hpp