Solved

Using stream I/O in Doc/View model

Posted on 1998-05-18
2
199 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

738 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