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 4496 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 4649 of file utils.h.
Registers an entity created by the default constructor.
Definition at line 4643 of file utils.h.
Creates a new entity.
Definition at line 4630 of file utils.h.
Returns a STL-like iterator to the start of the entity list.
Definition at line 4566 of file utils.h.
Deletes all elements from the list.
Definition at line 4579 of file utils.h.
Returns false if no named entities have been defined yet.
Definition at line 4569 of file utils.h.
Returns a STL-like iterator to the end of the entity list.
Definition at line 4563 of file utils.h.
Called while restoring the model from an XML-file.
This is called when the corresponding close element tag is encountered, and the Data() member of pElement is valid.
Implements frepple::utils::Object.
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::SetupMatrix, 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 4651 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 4612 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 4623 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 4670 of file utils.h.
Rename the entity.
Definition at line 4588 of file utils.h.
Returns the number of defined entities.
Definition at line 4572 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 4576 of file utils.h.
A handler that is used to persist the tree.
Definition at line 4765 of file utils.h.
The documentation for this class was generated from the following files: