C
Christopher
I am thinking about converting some really nasty code that exposes a
sprintf type function for taking arguments of various types using
va_list and reinterpret casts, then a bunch of global functions to
formatting strings, to a stream operator.
My stream operator will need to know how to convert various types to
suitable strings for insertion to a database.
So, I thought I probably need to imbue a stream with a custom
"Informix DB" facet.
Can someone help me out with an example that will simply replace '\'
with "\\" on given wstrings?
---
A second question is, can I use a facet to perform different
formatting on typedefs?
typedef std::wstring objectName
typedef std::wstring objectShortName
typedef std::wstring SystemName
Whomever designed our database loved making columns that were string
types, but formatted them differently.
sprintf type function for taking arguments of various types using
va_list and reinterpret casts, then a bunch of global functions to
formatting strings, to a stream operator.
My stream operator will need to know how to convert various types to
suitable strings for insertion to a database.
So, I thought I probably need to imbue a stream with a custom
"Informix DB" facet.
Can someone help me out with an example that will simply replace '\'
with "\\" on given wstrings?
---
A second question is, can I use a facet to perform different
formatting on typedefs?
typedef std::wstring objectName
typedef std::wstring objectShortName
typedef std::wstring SystemName
Whomever designed our database loved making columns that were string
types, but formatted them differently.