I'm trying to find an elegant way to parse a string like:
EVENT_TYPE(param1;param2; ...)
EVENT_TYPE is one of many string constants, each has zero or more parameters.
So far I thought that given the sting "s" contains EVENT_TYPE(param1;param2) I'd write:
if (boost::istarts_with(s, "EVENT_TYPE")) {
std::istringstream iss(s);
int p...
std::istream has the prototype istream& read (char* s, streamsize n) the actual number of bytes read should be gotten by calling istream::gcount(), also the validity of the istream can be known from ios::good.
I was discussing another stream class' implementation I was trying to write with a colleague of mine, where I was saying I might...
Hello
i have created two classes. One for input reading (through an istream object) and parsing and the other one for processing the output of the parser.
There is one instance of each of those.
I have the parser running in a loop calling istream::get() and then creating commands for the second object based upon the input. These comma...
I have the following Delphi code:
var
Stream: TMemoryStream;
StreamI: TStreamAdapter;
OleStream: IStream;
begin
Stream:= TMemoryStream.Create;
Stream.LoadFromFile(filename);
StreamI:= TStreamAdapter.Create(Stream, soOwned);
VSPDFViewer1.LoadStream(StreamI as IStream, '');
end;
Which actually passes an IStream object to a COM c...
What is the best way to parse or iterate an istream? I need to create a function that takes an istream, parses it and creates an object so was wondering the easiest way to do this. Even something that could convert it to string would be dandy.
...