ppap4lmp
0.7.2
|
GenDict is a dictionary (or map) of Generator objects. More...
#include <gen_dict.h>
Public Member Functions | |
GenDict (const Map< Str, ShPtr< Generator >> &generator_dict_) | |
Constructor of GenDict class. More... | |
virtual ElPtr | get_element (const Json &name=nullptr) override |
Get a value in generator_dict as a shared pointer of Element class. More... | |
virtual ShPtr< Generator > | get_generator (const Json &name=nullptr) override |
Get a value in generator_dict as a shared pointer of Generator class. More... | |
virtual void | accessed_by_instance_of (const Str &classname) override |
Set class name of an instance calling Element::check_required_keys. More... | |
Set< Str > | get_keys () |
Get a set of the keys of generator_dict. More... | |
![]() | |
void | book_to_generate_data () |
Appoint to this Generator object. More... | |
void | generate_data () |
Hello to this Generator object. More... | |
void | finish_using_generated_data () |
Goodbye to this object. More... | |
const Vec< UpdatePair > & | get_update_chain () |
Get update_chain of this object. More... | |
Private Attributes | |
Map< Str, ShPtr< Generator > > | generator_dict |
Additional Inherited Members | |
![]() | |
void | merge_update_chain (const Vec< UpdatePair > &new_chain) |
![]() | |
Vec< UpdatePair > | update_chain |
GenDict is a dictionary (or map) of Generator objects.
This class is a subclass of Generator class and stores an arbitrary number of Generator objects as a dictionary (map) of shared pointers of Generator class.
Definition at line 20 of file gen_dict.h.
Constructor of GenDict class.
generator_dict_ | Dictionary of shared pointers of Generator class. This parameter is assigned to generator_dict. |
This constructor is thread-unsafe because it accesses its members thread-globally. Ensure this constructor is not called in a multithreading context.
Definition at line 15 of file gen_dict.cpp.
|
overridevirtual |
Set class name of an instance calling Element::check_required_keys.
classname | A string to be assigned to Element::accessing_classname. |
Implements Generator.
Definition at line 55 of file gen_dict.cpp.
Get a value in generator_dict as a shared pointer of Element class.
name | A string key in generator_dict. |
One needs to get a value of generator_dict as Element when using its Element::data.
Implements Generator.
Definition at line 28 of file gen_dict.cpp.
Get a value in generator_dict as a shared pointer of Generator class.
name | A string key in generator_dict. |
One needs to get a value of generator_dict as Generator when storing that object.
Implements Generator.
Definition at line 42 of file gen_dict.cpp.
Get a set of the keys of generator_dict.
Definition at line 66 of file gen_dict.cpp.