Creating TBuf<> equivalent...
| Thu, 2007-03-08 09:52 | |
|
|
I am referring to this link...
http://msdn2.microsoft.com/en-us/library/aa454903.aspx It gives a possible replacement for TBuf<>: std:wstring So, my implementation looks something like this (it supports both Symbian and Windows) class VString { VString(); int Length(){ #ifdef SYMBIAN return str.Length(); #else return str.length(); private: #ifdef SYMBIAN TBuf<128> str; #else std::wstring str; #endif }; Can I replace this hardcoded 128 so that it can accept a value at runtime. I mean any work around here? or do I have to use dynamic buffer. Also, is STL supported in Symbian, in case I haveto use std::vector<void*> instead of RPointerArray in symbian itself? |






Forum posts: 364
So if you change your class to use an RBuf or HBufC* you're then going to have to start worring about things such as cleanup. The more you start to try and create a dual purpose class the more and more problems you will inevitably run into.