# class GenObject | An object with just a public virtual destructor More...
Full name | `TelEngine::GenObject`
Definition | `#include <yateclass.h>`
Inherited by | ASNObjId, AnalogLine, AnalogLineEvent, AnalogLineGroup, Array, AsnMib, AsnObject, AsnValue, Base64, CallEndpoint, CallInfo, CapturedEvent, ChanAssist, ChanAssistList, ChanAssistList, Channel, Cipher, Client, ClientAccount, ClientAccountList, ClientChannel, ClientContact, ClientDir, ClientDriver, ClientDriver, ClientFile, ClientFileItem, ClientLogic, ClientResource, ClientSound, Compressor, Configuration, DataBlock, DataConsumer, DataEndpoint, DataFormat, DataNode, DataSource, DataTranslator, DefaultLogic, DnsRecord, Driver, Driver, DurationUpdate, ExpFunction, ExpOperation, ExpWrapper, GTT, GenPointer, HashList, IAXFrame, IAXFrameOut, IAXFullFrame, IAXInfoElement, IAXInfoElementBinary, IAXInfoElementNumeric, IAXInfoElementString, IAXMetaTrunkFrame, IAXTransaction, IAXTrunkInfo, ISDNFrame, ISDNIUA, ISDNIUAClient, ISDNLayer2, ISDNLayer3, ISDNQ921, ISDNQ921, ISDNQ921Management, ISDNQ921Management, ISDNQ921Management, ISDNQ921Passive, ISDNQ921Passive, ISDNQ931, ISDNQ931Call, ISDNQ931CallMonitor, ISDNQ931IE, ISDNQ931Message, ISDNQ931Monitor, JBClientEngine, JBClientStream, JBClusterStream, JBConnect, JBEngine, JBEntityCaps, JBEntityCapsList, JBEvent, JBRemoteDomainDef, JBServerEngine, JBServerStream, JBStream, JBStreamSet, JBStreamSetList, JBStreamSetProcessor, JBStreamSetReceive, JGCrypto, JGRtpCandidate, JGRtpCandidateP2P, JGRtpCandidates, JGRtpMedia, JGRtpMediaList, JGSentStanza, JGSession, JGSession0, JGSession1, JGSessionContent, JGStreamHost, JIDIdentity, JIDIdentityList, JabberID, JsArray, JsFunction, JsObject, JsParser, JsRegExp, MGCPEndpoint, MGCPEpInfo, MGCPMessage, MGCPTransaction, Message, MessageDispatcher, MessageHandler, MessageHook, MessagePostHook, MessageQueue, MessageReceiver, MessageRelay, MimeAuthLine, MimeBinaryBody, MimeBody, MimeHeaderLine, MimeLinesBody, MimeMultipartBody, MimeSdpBody, MimeStringBody, Module, Module, MucRoom, MucRoomMember, MultiRouter, NamedCounter, NamedInt, NamedList, NamedPointer, NamedString, NaptrRecord, ObjList, ObjVector, OctetString, Plugin, RTPDejitter, RTPGroup, RTPProcessor, RTPSecure, RTPSession, RTPTransport, RefObject, Regexp, RemoteBackupSubsystem, SASL, SCCP, SCCPManagement, SCCPUser, SDPMedia, SIGAdaptClient, SIGAdaptServer, SIGAdaptation, SIGTransport, SIPDialog, SIPMessage, SIPParty, SIPTransaction, SS7AnsiSccpManagement, SS7BICC, SS7ISUP, SS7ISUPCall, SS7ItuSccpManagement, SS7L2User, SS7L3User, SS7Layer2, SS7Layer3, SS7Layer4, SS7M2PA, SS7M2UA, SS7M2UAClient, SS7M3UA, SS7MSU, SS7MTP2, SS7MTP2, SS7MTP3, SS7MTP3, SS7Management, SS7MsgISUP, SS7MsgSCCP, SS7MsgSNM, SS7MsgSccpReassemble, SS7PointCode, SS7Route, SS7Router, SS7Router, SS7SCCP, SS7SCCP, SS7SCCPDataSegment, SS7SUA, SS7TCAP, SS7TCAPANSI, SS7TCAPComponent, SS7TCAPITU, SS7TCAPMessage, SS7TCAPTransaction, SS7TCAPTransactionANSI, SS7TCAPTransactionITU, SS7TUP, SS7Testing, SccpLocalSubsystem, SccpRemote, SccpSubsystem, ScriptAsync, ScriptCode, ScriptContext, ScriptParser, ScriptRun, ScriptStack, SignallingCall, SignallingCircuit, SignallingCircuitEvent, SignallingCircuitGroup, SignallingCircuitRange, SignallingCircuitSpan, SignallingComponent, SignallingFactory, SignallingInterface, SignallingMessage, SignallingMessageTimer, SignallingMessageTimerList, SignallingReceiver, SocketAddr, SocketFilter, SrvRecord, String, SubsystemStatusTest, TCAPUser, ThreadedSource, TranslatorFactory, UDPSession, UDPTLSession, UIFactory, UIWidget, URI, Window, XMPPFeature, XMPPFeatureCompress, XMPPFeatureList, XMPPFeatureSasl, XmlCData, XmlChild, XmlComment, XmlDeclaration, XmlDoctype, XmlElement, XmlElementOut, XmlText
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- GenObject ()
- virtual ~GenObject ()
- virtual bool alive () const
- virtual void destruct ()
- virtual const String& toString () const
- virtual void* getObject (const String& name) const
- inline NamedCounter* getObjCounter () const
- NamedCounter* setObjCounter (NamedCounter* counter)

#### Public Static Methods

- static inline void* getObject (const String& name, const GenObject* obj)
- static inline bool getObjCounting ()
- static inline void setObjCounting (bool enable)
- static NamedCounter* getObjCounter (const String& name, bool create = true)
- static ObjList& getObjCounters ()

## Detailed Description

An object with just a public virtual destructor

GenObject () | ### GenObject

Default constructor

~GenObject () | ### ~GenObject

[virtual]

Destructor.

bool alive () | ### alive

[const virtual]

Check if the object is still valid and safe to access. Note that you should not trust this result unless the object is locked by other means.

Returns: True if the object is still useable

void destruct () | ### destruct

[virtual]

Destroys the object, disposes the memory.

const String& toString () | ### toString

[const virtual]

Get a string representation of this object

Returns: A reference to a String representing this object which is either null, the object itself (for objects derived from String) or some form of identification

void* getObject (const String& name) | ### getObject

[const virtual]

Get a pointer to a derived class given that class name

Parameters:

name | Name of the class we are asking for

Returns: Pointer to the requested class or NULL if this object doesn't implement it

inline void* getObject (const String& name, const GenObject* obj) | ### getObject

[static]

Helper method to get the pointer to a derived class

Parameters:

name | Name of the class we are asking for
obj | Pointer to the object to get derived class from

Returns: Pointer to the requested class or NULL if this object doesn't implement it

inline bool getObjCounting () | ### getObjCounting

[static]

Get the global state of object counting

Returns: True if object counting is enabled

inline void setObjCounting (bool enable) | ### setObjCounting

[static]

Set the global state of object counting

Parameters:

enable | True to enable object counting, false to disable

inline NamedCounter* getObjCounter () | ### getObjCounter

[const]

Get the counter of this object

Returns: Pointer to current counter object

NamedCounter* setObjCounter (NamedCounter* counter) | ### setObjCounter

Set the counter of this object

Parameters:

counter | New counter object or NULL

Returns: Pointer to old counter object

NamedCounter* getObjCounter (const String& name, bool create = true) | ### getObjCounter

[static]

Retrieve or allocate an object counter

Parameters:

name | Name of the counter
create | True to create a new counter if needed

Returns: Pointer to existing or new counter object

ObjList& getObjCounters () | ### getObjCounters

[static]

Access the object counters list

Returns: Reference to the global object counters list

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.