Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using stream I/O in Doc/View model

Posted on 1998-05-18
2
Medium Priority
?
222 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 100 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

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…
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

618 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