Home My Page Projects Code Snippets Project Openings DPWS Core
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files Mediawiki

[#279] Use of const char* for strings to increase C++ compatibilty

Date:
2010-04-23 11:53
Priority:
3
State:
Open
Submitted by:
Daniel Muhra (nostradani)
Assigned to:
Nobody (None)
Product:
DPWS Core
Operating System:
All
Component:
DPWS Core / All components
Detailed Status:
Do Scheduled/WaitForImplement
Detailed Status Reason and Comment:
Scheduled in V3
Status:
Do
Summary:
Use of const char* for strings to increase C++ compatibilty

Detailed description
Casual C++ applications rely on the use of std::string for standard strings. This class also offers a function c_str() to return C compatible strings. In fact it uses const char* as return type.
Unfortunately this causes problems with functions which use char* parameters.

Here you would have to create a copy of the string which is very unwanted especially at platforms with limited ressources. In most cases, const char* should be sufficent enough, since single char replacement is rather uncommon (from my point of view).
Therefore I would very much like to see this in future DPWSCORE releases.

No Comments Have Been Posted

Field Old Value Date By
StatusOpen2010-06-15 12:46fdepeiss
Detailed StatusNone2010-06-15 12:46fdepeiss