frepple::utils::HasName< T > Class Template Reference
Base class for objects using a string as their primary key.
More...
#include <utils.h>
List of all members.
Detailed Description
template<class T>
class frepple::utils::HasName< T >
Base class for objects using a string as their primary key.
Instances of this class have the following properties:
- Have a unique name.
- A hashtable (keyed on the name) is maintained as a container with all active instances.
Definition at line 3707 of file utils.h.
Constructor & Destructor Documentation
Member Function Documentation
Registers an entity created by the default constructor. The second argument is a hint: when passing an entity with a name close to the new one, the insertion will be sped up considerably.
Definition at line 3843 of file utils.h.
Registers an entity created by the default constructor.
Definition at line 3837 of file utils.h.
Creates a new entity.
Definition at line 3824 of file utils.h.
Returns a STL-like iterator to the start of the entity list.
Definition at line 3777 of file utils.h.
Deletes all elements from the list.
Definition at line 3790 of file utils.h.
Returns false if no named entities have been defined yet.
Definition at line 3780 of file utils.h.
Returns a STL-like iterator to the end of the entity list.
Definition at line 3774 of file utils.h.
Reimplemented in frepple::Calendar, frepple::CalendarValue< T >, frepple::CalendarPointer< T >, frepple::Solver, frepple::Location, frepple::Customer, frepple::Operation, frepple::OperationFixedTime, frepple::OperationTimePer, frepple::OperationRouting, frepple::OperationAlternate, frepple::Item, frepple::Buffer, frepple::BufferProcure, frepple::Resource, frepple::Demand, frepple::SolverMRP, frepple::utils::HasHierarchy< T >, module_forecast::Forecast, module_lp_solver::LPSolver, frepple::utils::HasHierarchy< Item >, frepple::utils::HasHierarchy< Location >, frepple::utils::HasHierarchy< Demand >, frepple::utils::HasHierarchy< Customer >, frepple::utils::HasHierarchy< Resource >, and frepple::utils::HasHierarchy< Buffer >.
Definition at line 3845 of file utils.h.
Find an entity given its name. In case it can't be found, a NULL pointer is returned.
Definition at line 3806 of file utils.h.
Find the element with this given key or the element immediately preceding it.
The optional second argument is a boolean that is set to true when the element is found in the list.
Definition at line 3817 of file utils.h.
This method is available as a object creation factory for classes that are using a string as a key identifier, in particular classes derived from the HasName base class. The following attributes are recognized:
- name:
Name of the entity to be created/changed/removed.
The default value is "unspecified".
- type:
Determines the subclass to be created.
The default value is "default".
- action:
Determines the action to be performed on the object.
This can be A (for 'add'), C (for 'change'), AC (for 'add_change') or R (for 'remove').
'add_change' is the default value. - See also:
- HasName
Definition at line 3864 of file utils.h.
Rename the entity.
Definition at line 3799 of file utils.h.
Returns the number of defined entities.
Definition at line 3783 of file utils.h.
Debugging method to verify the validity of the tree. An exception is thrown when the tree is corrupted.
Definition at line 3787 of file utils.h.
A handler that is used to persist the tree.
Definition at line 3957 of file utils.h.
The documentation for this class was generated from the following files: