|
| Map (const std::string &name) |
|
virtual | ~Map () |
| Virtual destructor. More...
|
|
void | reserve (size_t max_size) |
| Reserve memory. More...
|
|
void | copy_std_map (std::map< key_type, data_type > &map) |
| Copy a std::map into the Map. More...
|
|
Uint | push_back (const key_type &key, const data_type &data) |
| Insert pair without any checks if it is already present. More...
|
|
std::pair< iterator, bool > | insert (const value_type &v) |
| Insert pair the same way a std::map would. More...
|
|
iterator | find (const key_type &key) |
| Find the iterator matching with the given KEY. More...
|
|
const_iterator | find (const key_type &key) const |
| Find the iterator matching with the given KEY. More...
|
|
void | erase (iterator itr) |
| Erase the given iterator from the map. More...
|
|
bool | erase (const key_type &key) |
| Erase the entry wit given key from the map. More...
|
|
bool | exists (const key_type &key) |
| Check if the given KEY is existing in the Map. More...
|
|
bool | exists (const key_type &key) const |
| Check if the given KEY is existing in the Map. More...
|
|
void | clear () |
| Clear the content of the map. More...
|
|
size_t | size () const |
| Get the number of pairs already inserted. More...
|
|
size_t | capacity () const |
| Get the capacity of the map (memory allocated) More...
|
|
data_type & | operator[] (const key_type &key) |
| Overloading of the operator"[]" for assignment AND insertion. More...
|
|
const data_type & | operator[] (const key_type &key) const |
| Overloading of the operator"[]" for assignment AND insertion. More...
|
|
void | sort_keys () |
| Sort all the pairs in the map by key. More...
|
|
iterator | begin () |
|
const_iterator | begin () const |
|
iterator | end () |
|
const_iterator | end () const |
|
| Component (const std::string &name) |
|
virtual | ~Component () |
| Virtual destructor. More...
|
|
const std::string & | name () const |
| Access the name of the component. More...
|
|
void | rename (const std::string &name) |
| Rename the component. More...
|
|
URI | uri () const |
| Construct the full path. More...
|
|
void | complete_path (URI &path) const |
|
Handle< Component > | access_component (const URI &path) const |
|
Handle< Component > | access_component_checked (const URI &path) |
|
Handle< Component const > | access_component_checked (const URI &path) const |
|
Handle< Component > | handle () |
| Get a handle to the component. More...
|
|
Handle< Component const > | handle () const |
|
template<typename ComponentT > |
Handle< ComponentT > | handle () |
|
template<typename ComponentT > |
Handle< ComponentT const > | handle () const |
|
Handle< Component > | parent () const |
|
Handle< Component const > | root () const |
|
Handle< Component > | root () |
|
Handle< Component > | get_child (const std::string &name) |
|
Handle< Component const > | get_child (const std::string &name) const |
|
Handle< Component > | get_child_checked (const std::string &name) |
|
Handle< Component const > | get_child_checked (const std::string &name) const |
|
Handle< Component > | create_component (const std::string &name, const std::string &builder) |
| Build a (sub)component of this component using the extended type_name of the component. More...
|
|
template<typename T > |
Handle< T > | create_component (const std::string &name) |
| Create a (sub)component of this component automatically cast to the specified type. More...
|
|
template<typename T > |
Handle< T > | create_static_component (const std::string &name) |
| Create a static "always there" subcomponent. More...
|
|
Component & | add_component (const boost::shared_ptr< Component > &subcomp) |
| Add the passed component as a subcomponent. More...
|
|
void | add_link (Component &linked_component) |
|
boost::shared_ptr< Component > | remove_component (const std::string &name) |
| Remove a (sub)component of this component. More...
|
|
boost::shared_ptr< Component > | remove_component (Component &subcomp) |
| Remove a (sub)component of this component. More...
|
|
void | clear () |
| Remove all sub-components of this component, except for the static ones. More...
|
|
void | move_to (Component &to_parent) |
|
std::string | tree (bool basic_mode=false, Uint depth=0, Uint recursion_level=0) const |
|
std::string | info (const std::string &what=std::string("cospt")) const |
|
size_t | count_children () const |
|
virtual std::string | derived_type_name () const =0 |
|
PropertyList & | properties () |
|
const PropertyList & | properties () const |
|
OptionList & | options () |
|
const OptionList & | options () const |
|
void | reset_options () |
| Reset all options to their default value. More...
|
|
void | configure_option_recursively (const std::string &optname, const boost::any &val) |
|
Component & | mark_basic () |
| marks this component as basic. More...
|
|
template<typename ComponentT > |
void | put_components (std::vector< boost::shared_ptr< ComponentT > > &vec, const bool recurse) |
|
template<typename ComponentT > |
void | put_components (std::vector< boost::shared_ptr< ComponentT const > > &vec, const bool recurse) const |
|
template<> |
void | put_components (std::vector< boost::shared_ptr< Component > > &vec, const bool recurse) |
|
template<> |
void | put_components (std::vector< boost::shared_ptr< Component const > > &vec, const bool recurse) const |
|
Component::iterator | begin () |
| The begin iterator for a range containing Components. More...
|
|
Component::iterator | end () |
| The end iterator for a range containing Components. More...
|
|
Component::const_iterator | begin () const |
| The begin iterator for a range containing Components (const version) More...
|
|
Component::const_iterator | end () const |
| The end iterator for a range containing Components (const version) More...
|
|
Component::iterator | recursive_begin () |
| The begin iterator for a recursive range containing Components. More...
|
|
Component::iterator | recursive_end () |
| The end iterator for a recursive range containing Components. More...
|
|
Component::const_iterator | recursive_begin () const |
| The begin iterator for a recursive range containing Components (const version) More...
|
|
Component::const_iterator | recursive_end () const |
| The end iterator for a recursive range containing Components (const version) More...
|
|
template<typename T > |
Handle< T > | create_component (const std::string &name, const std::string &builder) |
| Create a component using the reduced builder name. More...
|
|
void | signal_configure (SignalArgs &args) |
| configures all the options on this class More...
|
|
void | signal_create_component (SignalArgs &args) |
| creates a component from this component More...
|
|
void | signal_delete_component (SignalArgs &args) |
| delete this component More...
|
|
void | signal_move_component (SignalArgs &args) |
| moves a component from this component to another More...
|
|
void | signal_list_tree (SignalArgs &args) const |
| lists the sub components and puts them on the xml_tree More...
|
|
void | signal_list_tree_recursive (SignalArgs &args) const |
| prints tree recursively More...
|
|
void | signal_list_properties (SignalArgs &args) const |
| lists the properties of this component More...
|
|
void | signal_list_options (SignalArgs &args) const |
| lists the properties of this component More...
|
|
void | signal_list_options_recursive (SignalArgs &args) const |
| prints all options recursive More...
|
|
void | signal_list_signals (SignalArgs &args) const |
| lists the signals of this component More...
|
|
void | signal_list_signals_recursive (SignalArgs &args) const |
| prints all signals recursive More...
|
|
void | signal_print_info (SignalArgs &args) const |
| gets info on this component More...
|
|
void | signal_print_tree (SignalArgs &args) const |
| signal to print the tree More...
|
|
void | signature_print_tree (SignalArgs &args) const |
| signature to signal_print_tree More...
|
|
void | signal_rename_component (SignalArgs &args) |
| renames this component More...
|
|
void | signal_save_tree (SignalArgs &args) |
| dumps the tree to a file More...
|
|
void | signal_list_content (SignalArgs &args) |
| gives information about this component such as options, signals, ... More...
|
|
void | signal_signature (SignalArgs &args) |
| Gives a signal signature, if any. More...
|
|
void | signature_create_component (SignalArgs &args) |
|
void | signature_rename_component (SignalArgs &args) |
|
void | signature_move_component (SignalArgs &args) |
|
void | signal_store_timings (SignalArgs &args) |
| Signal to store the timings (if enabled) into properties, i.e. for readout from python or the GUI. More...
|
|
void | signal_clear (SignalArgs &args) |
| Signal to remove all sub-components. More...
|
|
void | signal_reset_options (SignalArgs &args) |
| Signal to set all options to their default value. More...
|
|
void | signal_add_tag (SignalArgs &args) |
| Signal to add a tag. More...
|
|
void | signature_add_tag (SignalArgs &args) |
|
Public Member Functions inherited from SignalHandler |
| ~SignalHandler () |
|
const storage_t & | signal_list () const |
|
SignalPtr | signal (const SignalID &sname) |
|
SignalCPtr | signal (const SignalID &sname) const |
|
SignalRet | call_signal (const SignalID &sname, SignalArgs &sinput) |
| Calls the signal by providing its name and input. More...
|
|
SignalRet | call_signal (const SignalID &sname, std::vector< std::string > &sinput) |
| Calls the signal by providing its name and input. More...
|
|
bool | signal_exists (const SignalID &sname) const |
| Checks if a signal exists or not. More...
|
|
Signal & | regist_signal (const SignalID &sname) |
| Regist signal. More...
|
|
void | unregist_signal (const SignalID &sname) |
| Unregist signal. More...
|
|
| ~ConnectionManager () |
| destructor closes all connections More...
|
|
Connection * | connection (const std::string &name) |
|
Connection * | manage_connection (const std::string &name) |
| manages a connection (creates if necessary) More...
|
|
| TaggedObject () |
| Constructor. More...
|
|
bool | has_tag (const std::string &tag) const |
|
void | add_tag (const std::string &tag) |
|
std::vector< std::string > | get_tags () const |
|
void | remove_tag (const std::string &tag) |
|
template<typename KEY, typename DATA>
class cf3::common::Map< KEY, DATA >
This component class represents a "cheap" (from the point of view of the memory requirements) map with SINGLE key that gives the same performance in searching of a std::map (the number of comparisons is <= 2*log(size)+1. Since the high memory storage is an issue with the standard std::map, this class offer a valid efficient alternative to it. Map that is just an Adapter of std::vector<std::pair<KEY,DATA> >. The advantage of this map is that it is faster to construct (build vector, sort once) and uses less memory than std::map. The disadvantage is that it is much slower when elements need to be looked up while the map is being constructed. The class is parameterized with the types of the key and the type of the value
- Precondition
- this map can handle KEYs for which the operators "<" and ">" are available
-
before using find() the Map has to be sorted. This will happen automatically
-
the situation in which this map must be used is a situation in which you first insert ALL the pairs, then you sort (sort_keys() is a demanding operation that must be applied only once!!) and then you start searching with find(). Consider using 2 seperate vectors (one for keys and one for elements) It will be easier on the memory allocator, and it will provide for faster access (multiple keys will be loaded in one cacheline when searching)
- Author
- Andrea Lani
-
Tiago Quintino
-
Willem Deconinck
Definition at line 43 of file Map.hpp.