I've opened Jira 764 and have attached a patch that typedefs SDOString to
std::string

Cheers,


On 29/09/06, Pete Robbins <[EMAIL PROTECTED]> wrote:

I've been playing around tidying up some of the SDO code where we have
methods implemented that take parameters as char* and SDOString (See latest
DataObjectImpl changes).

I'd like to propose we get rid of SDOString and just use std::string.
SDOString inherits from std::string but does not add any additional
function. The initial idea of having SDOString was to add an additional
operator const char*() so that when we changed public API return values from
const char* to SDOString a user would not have to ammend their code.
However, this didn't quite work so I believe SDOString is redundant.

I experimented by typedef'ing SDOString to std::string and it won't be too
tricky to fix the few compile errors. I will hold off checking this in until
we have consensus that it is the right thing to do.

Next, we have many duplicate methods that take parameters as string or
char*. I would like to remove all the methods that take char* as const
string& will work just as well without causing users problems. I realise
that this is currently being discussed by the spec group and the current
spec has the interfaces using char*, however for input paramters this
proposal will still support the methods as if they were passing char* so I
think we should go for it. I'm sure the spec group will get round to
agreeing woth this ;-)

Finally, and a bit later, we need to look at changing the public APIs that
return char* to return std::string but this can wait for the spec group to
decide if this is what they want. This will affect users as they will need
to use .c_str() on their return values if they require th char* string.

Cheers,

--
Pete




--
Pete

Reply via email to