class DurationUpdate

An UI time updater. More...

Full nameTelEngine::DurationUpdate
Definition#include <yatecbase.h>
InheritsTelEngine::RefObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Protected Methods

Protected Members


Detailed Description

Class used to update UI durations. The string keeps the object's id. This object can be used to keep additional data associated with a client channel

inline  DurationUpdate (ClientLogic* logic, bool owner, const char* id, const char* name, unsigned int start = Time::secNow())

DurationUpdate

Constructor. Add itself to logic's list

Parameters:
logicThe client logic used to update this duration object
ownerTrue if the logic is owning this object
idObject id
nameObject name (widget or column name)
startStart time in seconds

 ~DurationUpdate ()

~DurationUpdate

[virtual]

Destructor

const String&  toString ()

toString

[const virtual]

Get a string representation of this object

Returns: This duration's id

Reimplemented from GenObject.

void  setLogic (ClientLogic* logic = 0, bool owner = true)

setLogic

Set the logic used to update this duration object. Remove from the old one

Parameters:
logicThe client logic used to update this duration object
ownerTrue if the logic is owning this object

unsigned int  update (unsigned int secNow, const String* table = 0, Window* wnd = 0, Window* skip = 0, bool force = false)

update

[virtual]

Update UI if duration is non 0

Parameters:
secNowCurrent time in seconds
tableThe table to update. Set to 0 to update text widgets
wndOptional window to update
skipOptional window to skip if wnd is 0
forceSet to true to update even if duration is 0

Returns: The duration

unsigned int  buildTimeParam (NamedList& dest, unsigned int secNow, bool force = false)

buildTimeParam

[virtual]

Build a duration string representation and add the parameter to a list

Parameters:
destDestination list
secNowCurrent time in seconds
forceSet to true to add the parameter even if duration is 0

Returns: The duration

unsigned int  buildTimeString (String& dest, unsigned int secNow, bool force = false)

buildTimeString

[virtual]

Build a duration string representation hh:mm:ss. The hours are added only if non 0

Parameters:
destDestination string
secNowCurrent time in seconds
forceSet to true to build even if duration is 0

Returns: The duration

unsigned int  buildTimeParam (NamedList& dest, const char* param, unsigned int secStart, unsigned int secNow, bool force = false)

buildTimeParam

[static]

Build a duration string representation and add the parameter to a list

Parameters:
destDestination list
paramParameter to add
secStartStarting time in seconds
secNowCurrent time in seconds
forceSet to true to add the parameter even if duration is 0

Returns: The duration

unsigned int  buildTimeString (String& dest, unsigned int secStart, unsigned int secNow, bool force = false)

buildTimeString

[static]

Build a duration string representation hh:mm:ss. The hours are added only if non 0

Parameters:
destDestination string
secStartStarting time in seconds
secNowCurrent time in seconds
forceSet to true to build even if duration is 0

Returns: The duration

void  destroyed ()

destroyed

[protected virtual]

Release memory. Remove from updater

Reimplemented from RefObject.

String m_id

m_id

[protected]

ClientLogic* m_logic

m_logic

[protected]

String m_name

m_name

[protected]

unsigned int m_startTime

m_startTime

[protected]


Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.