From: Peter Ritter <[email protected]> - 30 Sep 1998
> I do have another question: How do I convert a c4_StringRef to a > char*, as well as into an STL std::string ? Using the following looks > strange. > > char* pChar = (char*)(c4_String)StringRef
Yes, this sort of "double-casting" is messy. Note that you can avoid one cast in this particular case, because c4_String objects can be used where (const char*) is needed (note the "const"), so this should work:
const char* pChar = (c4_String) StringRef;
This is going to change, I'm currently reworking the internal data buffering to avoid a lot of string copying (I won't give performance figures yet, but it should provide a very nice performance boost).
As a result, c4_StringRef objects will have conversions to (const char*) without requiring the intermediate c4_String overhead. You can still place the results in a c4_String, since there is a constructor for it.
> And also, where does the documentation say which symbol to use when > defining the structure of a view? I = integer S = string F= double D > = ??? etc
Um... gosh, I couldn't find it either. Let me quickly get this info in here (and I'll fix this in the next release):
I = Integer S = String F = Float D = Double B = Bytes M = Memo
(and also V = view, but this is only used internally).
You can find all these codes in the source, such as in the c4_XXXProp constructors at the end of "mk4.inl", but that's hardly "documentation".
-- JC
I = Integer (32bit) L = Long Integer (64bit) L,F,D are not found in the q4_TINY configuration
-- wlb