|
Public Member Functions inherited from dabc::Command |
void | AddValuesFrom (const Command &cmd, bool canoverwrite=true) |
|
void | Cancel () |
| Call this method to cancel command execution. More...
|
|
void | ChangeName (const std::string &name) |
| Change command name, should not be used for remote commands. More...
|
|
void | ClearResult () |
|
| Command (const std::string &name) throw () |
| Default constructor, creates empty reference on the command. More...
|
|
bool | GetBool (const std::string &name, bool dflt=false) const |
|
double | GetDouble (const std::string &name, double dflt=0.) const |
|
int | GetInt (const std::string &name, int dflt=0) const |
|
int | GetPriority () const |
| Returns command priority. More...
|
|
void * | GetPtr (const std::string &name, void *deflt=0) const |
| Get pointer argument from the command. More...
|
|
Buffer | GetRawData () |
| Returns reference on raw data Can be called only once - raw data reference will be cleaned. More...
|
|
std::string | GetReceiver () const |
|
Reference | GetRef (const std::string &name) |
| Returns reference from the command, can be called only once. More...
|
|
int | GetResult () const |
|
std::string | GetStr (const std::string &name, const std::string &dflt="") const |
|
unsigned | GetUInt (const std::string &name, unsigned dflt=0) const |
|
bool | HasResult () const |
|
bool | IsCanceled () |
| Return true if command was canceled. More...
|
|
bool | IsTimedout () const |
| Returns true if command timeout is expired. More...
|
|
bool | IsTimeoutSet () const |
| Return true if timeout was specified. More...
|
|
void | Print (int lvl=0, const char *from=nullptr) const |
| Show on debug output content of command. More...
|
|
bool | ReadFromCmdString (const std::string &str) |
| Read command from string, which is typed in std output. More...
|
|
void | Release () |
| Method used to clean command - all internal data will be cleaned, command container will be released. More...
|
|
void | RemoveReceiver () |
|
void | Reply (int res=cmd_noresult) |
| Replied on the command. More...
|
|
void | ReplyBool (bool res) |
| Reply on the command with true or false value. More...
|
|
void | ReplyFalse () |
| Reply on the command with false (cmd_false==0) value. More...
|
|
void | ReplyTimedout () |
| Reply on the command with timeout value. More...
|
|
void | ReplyTrue () |
| Reply on the command with true (cmd_true==1) value. More...
|
|
void | ResetTimeout () |
| Disable timeout for the command. More...
|
|
bool | SetBool (const std::string &name, bool v) |
|
bool | SetDouble (const std::string &name, double v) |
|
bool | SetInt (const std::string &name, int v) |
|
void | SetPriority (int prio) |
| Set command priority, defines how fast command should be treated In special cases priority allows to execute command also in worker which is not active. More...
|
|
void | SetPtr (const std::string &name, void *p) |
| Set pointer argument for the command. More...
|
|
bool | SetRawData (Buffer rawdata) |
| Set raw data to the command, which can be transported also between nodes. More...
|
|
Command & | SetReceiver (const std::string &itemname) |
| These methods prepare command so, that one can submit command to the manager like: dabc::mgr.Submit(Command("Start").SetReceiver("Generator")); Command will be queued in manager queue and than submitted to specified object. More...
|
|
bool | SetRef (const std::string &name, Reference ref) |
| Set reference to the command. More...
|
|
void | SetResult (int res) |
|
bool | SetStr (const std::string &name, const char *value) |
|
bool | SetStr (const std::string &name, const std::string &value) |
|
bool | SetStrRawData (const std::string &str) |
| Set raw data with string content. More...
|
|
Command & | SetTimeout (double tm) |
| Set maximum time which can be used for command execution. More...
|
|
bool | SetUInt (const std::string &name, unsigned v) |
|
double | TimeTillTimeout (double extra=0.) const |
| Returns time which remains until command should be timed out. More...
|
|
bool | AddChild (Object *obj) |
| Add child to list of object children. More...
|
|
const char * | ClassName () const |
| Return class name of referenced object, if object not assigned, returns "---". More...
|
|
void | Destroy () throw () |
| Release reference and starts destroyment of referenced object. More...
|
|
Reference | FindChild (const char *name) const |
| Searches for child in referenced object. More...
|
|
bool | GetAllChildRef (ReferencesVector *vect) const |
| Return references for all childs. More...
|
|
Reference | GetChild (unsigned n) const |
| Return reference on child n. More...
|
|
Reference | GetFolder (const std::string &name, bool force=false) throw () |
| Return folder of specified name, no special symbols are allowed. More...
|
|
const char * | GetName () const |
| Return name of referenced object, if object not assigned, returns "---". More...
|
|
Object * | GetObject () const |
| Return pointer on the object. More...
|
|
Object * | GetParent () const |
| Returns pointer on parent object. More...
|
|
Reference | GetParentRef () const |
| Returns reference on parent object. More...
|
|
bool | IsName (const char *name) const |
| Returns true if object name is the same as specified one. More...
|
|
std::string | ItemName (bool compact=true) const |
| Produce string, which can be used as name argument in dabc::mgr.FindItem(name) call. More...
|
|
bool | null () const |
| Returns true if reference contains nullptr. More...
|
|
unsigned | NumChilds () const |
| Return number of childs in referenced object. More...
|
|
unsigned | NumReferences () const |
| Returns number of references on the object. More...
|
|
bool | operator! () const |
| Returns true if reference contains nullptr. More...
|
|
bool | operator!= (const Reference &src) const |
| Compare operator - return true if references refer to different object. More...
|
|
bool | operator!= (Object *obj) const |
| Compare operator - return true if reference refer to different objects. More...
|
|
Object * | operator() () const |
| Return pointer on the object. More...
|
|
Reference & | operator<< (Reference &src) throw () |
| Move operator - reference moved from source to target. More...
|
|
Reference & | operator= (const Reference &src) throw () |
| Assignment operator - copy reference. More...
|
|
Reference & | operator= (Object *obj) throw () |
| Assignment operator - copy reference. More...
|
|
bool | operator== (const Reference &src) const |
| Compare operator - return true if references refer to same object. More...
|
|
bool | operator== (Object *obj) const |
| Compare operator - return true if reference refer to same object. More...
|
|
void | Print (int lvl=0, const char *from=0) const |
| Show on debug output content of reference. More...
|
|
| Reference (const Reference &src) throw () |
| Copy constructor, if source is transient than source reference will be emptied. More...
|
|
| Reference (Object *obj=nullptr) |
| Constructor, creates reference on the object. More...
|
|
std::string | RelativeName (const dabc::Reference &topitem) |
| Produce name, which can be used to find item, calling topitem.FindChild(). More...
|
|
void | Release () throw () |
| Releases reference on the object. More...
|
|
bool | RemoveChild (const char *name, bool cleanup=true) |
| Remove child with given name and return reference on that child. More...
|
|
bool | RemoveChilds (bool cleanup=true) |
| Remove all childs in referenced object If cleanup true (default) and object is owner, all objects will be destroyed. More...
|
|
void | SetAutoDestroy (bool on=true) |
| Set autodestroy flag for the object Once enabled, object will be destroyed when last reference will be cleared. More...
|
|
void | SetObject (Object *obj, bool withmutex=true) |
| Direct set of object to reference. More...
|
|
Reference | Take () |
| Copy reference to output object. More...
|
|
virtual | ~Reference () |
| Destructor, releases reference on the object. More...
|
|
Static Public Member Functions inherited from dabc::Command |
static const char * | PriorityParName () |
| Name of the parameter, used to keep command priority. More...
|
|
static const char * | ReceiverParName () |
| Name of the parameter, used to specified command receiver. More...
|
|
static const char * | ResultParName () |
| Name of the parameter, used to keep command result. More...
|
|
Protected Member Functions inherited from dabc::Command |
virtual void | CreateRecord (const std::string &name) |
|
bool | AcquireRefWithoutMutex (Reference &ref) |
| Special method, which allows to generate new reference when object mutex is locked. More...
|
|
void | Assign (const Reference &src) |
| Method used in copy constructor and assigned operations. More...
|
|
Mutex * | ObjectMutex () const |
|
template<class T > |
bool | verify_object (Object *src, T *&tgt) |
| Method used in reference constructor/assignments to verify is object is suitable. More...
|
|
Object * | fObj |
| pointer on the object More...
|
|
Command used to produce custom binary data for published in hierarchy entries.
Definition at line 33 of file Publisher.h.