libvisual  0.5.0
Public Member Functions | List of all members
LV::ParamList Class Reference

Public Member Functions

 ParamList ()
 Creates a new empty ParamList.
 
 ParamList (std::initializer_list< Param * > params)
 Creates a new ParamList with entries drawn from an initializer list.
 
 ParamList (ParamList &&list)
 Move constructor.
 
 ~ParamList ()
 Destructor.
 
void add (Param &&param)
 Adds a new parameter entry. More...
 
void add (Param *param)
 Adds a new parameter entry. More...
 
template<class Container >
void add (Container const &params)
 Adds a list of parameters. More...
 
bool remove (std::string const &name)
 Removes a parameter by name. More...
 
Param * get (std::string const &name) const
 Returns a parameter by name. More...
 
void set_event_queue (EventQueue &event_queue)
 Sets the event queue. More...
 
EventQueueget_event_queue () const
 Returns the event queue. More...
 

Detailed Description

Definition at line 47 of file lv_param.h.

Member Function Documentation

void LV::ParamList::add ( Param &&  param)

Adds a new parameter entry.

Parameters
paramParameter to add

Definition at line 176 of file lv_param.cpp.

void LV::ParamList::add ( Param *  param)

Adds a new parameter entry.

Note
Entry will be managed and automatically freed.
Parameters
paramParameter to add

Definition at line 181 of file lv_param.cpp.

template<class Container >
void LV::ParamList::add ( Container const &  params)
inline

Adds a list of parameters.

Parameters
paramsList of parameters

Definition at line 91 of file lv_param.h.

Param * LV::ParamList::get ( std::string const &  name) const

Returns a parameter by name.

Parameters
nameName of parameter to return
Returns
Parameter of the given name, or nullptr if no such parameter exists

Definition at line 202 of file lv_param.cpp.

Referenced by LV::SongInfo::set_cover().

EventQueue * LV::ParamList::get_event_queue ( ) const

Returns the event queue.

See Also
set_event_queue()
Returns
Event queue if set, nullptr otherwise

Definition at line 171 of file lv_param.cpp.

bool LV::ParamList::remove ( std::string const &  name)

Removes a parameter by name.

Parameters
nameName of parameter to remove
Returns
true on success, false otherwise

Definition at line 191 of file lv_param.cpp.

void LV::ParamList::set_event_queue ( EventQueue event_queue)

Sets the event queue.

Parameters
event_queueEvent queue to hook send parameter update events to

Definition at line 166 of file lv_param.cpp.


The documentation for this class was generated from the following files: