Naming Conventions for Class Types...1 Category Examples Description T (“data type”) classes TDesC, TPoint, TFileName T classes don't have a destructor. They act like built-in types. No pointers, no resources C (“cleanup”) classes CConsoleBase, CActive, CBase Any class derived from CBase. C classes are allocated on heap. CBase also includes a virtual destructor, so that by calling delete on a CBase* pointer any C object it points to is properly destroyed.
Naming Conventions for Class Types...2 Category Examples Description R (“resource/remote”) classes RFile, RTimer, RWriteStream, RWindow Client-side handle to an OS resource (file server, message server, etc.) M (“mixin”) classes/interface classes MGraphicsDevice-Map,MGameViewCmd-Handler, MEikMenuObserver An interface consisting of pure virtual functions. A class implementing this interface should derive from it. M classes are the only approved use of multiple inheritance in Symbian OS.
Basic Data Types – Integers, Void, Boolean Boolean Void Signed Integer Unsigned Integer Name Size (bytes) Tint >=4 Tint8 1 Tint16 2 Tint32 4 Tint64 8 Name Size (bytes) TUint >=4 TUint8 1 TUint16 2 TUint32 4 Name Size TBool 4 Name Type TAny Void
Basic Data Types-Floating Point, Characters Floating Point (avoid it) Character Name Size (bytes) TReal 8 TReal32 4 TReal64 8 TRealX 12 Name Size (bytes) TText8 1 TText 2 TText16 2 TChar 4
Descriptor Classes Name Instatiable Modifiable Description TDesC No No abstract base class; argument passing and return values (const TDesC&) TDes No Yes abstract base class; argument passing return values (const TDes&) TBufC Yes No templated buffer descriptor: (size, data) stored together TPtrC Yes No pointer descriptor: (size, pointer) separate from data, data not owned TBuf Yes Yes templated buffer descriptor: (size, maximum size, data) stored together TPtr Yes Yes pointer descriptor: (size, maximum size, pointer) separate from data, data not owned HBufC Yes No heap descriptor: (size, maximum size, data) stored together on the heap