Solved

Using stream I/O in Doc/View model

Posted on 1998-05-18
2
188 Views
Last Modified: 2013-12-26
I have run into problem using TOutStream/TInStream classes in my OWL application. These stream classes derived from ostream/istream classes. This means that it write/read data in text format! How can I save data in real binary format (not only my own classes, but other OWL and BCPP classes, TPoint, for example)?
0
Comment
Question by:airat
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
msmits earned 50 total points
ID: 1299674
You could just try opening the stream in binary mode and writing the class you want on the output to the stream.
The problem with this is that some of the classes have internal pointers to other objects and possibly C strings (char *), which will then not be stored in your file.

If you really want such functionality, I suggest you create a derived class for each class you want streamable and provide extra functions to read and write the important information from and to file.
I believe C++Builder VCL classes are all streamable. At least they are all derived from a class with the substring streamable in the classname.
0
 
LVL 3

Expert Comment

by:msmits
ID: 1299675
Could you delete the other question that I didn't answer. It is identical to this one and will only cost you points.

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now