Sign in to follow this  

Limited support for stringstreams

This topic is 1114 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi All,

I am running AngelScript in an environment where there is limited or missing support for std::stringstream

I have changed the two files of the add-on scriptstdstring.cpp and scriptstdstring.h

I submit the here for inclusion in future releases.

I understand that this may be a too specific problem to be considered, but anyway, I submit the (partial) solution here for anyone interested.

I cannot attach the cpp file, but I can sent it to anyone interested.The changes in the include file are just the addition of the following lines:

// Some environment have a limited support of strstreams.
// Setting this define to 0 reverts all formatting options to general functions
//
//  0 = off
//  1 = on

#ifndef AS_USE_STRSTREAMS
#define AS_USE_STRSTREAMS 0
#endif

I must admit that the change is not complete. I am not using the generic interface, so in that case I just placed a TODO comment.

If someone else is interested I can develop further on this matter, otherwise, I will keep these changes in my AngelScript version only.

 

Regards.

Mau.

 

Share this post


Link to post
Share on other sites

It is a real time extension to the windows environment (RTX).

The real time runs like a windows driver, and normally drivers are written in pure C.

This environment offer some support to C++, but it is largely incomplete.

Generally it is risky to use the full power of C++ in rel time, since an apparently simple instruction like an assignment or a comparison may hide very expensive library or objects calls.

So the most advanced features of std and generally the containers are missing there.

Unfortunately stringstream falls into this category.

 

Hope this helps.

Mau.

Share this post


Link to post
Share on other sites

This topic is 1114 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this