Click here to Skip to main content
15,898,920 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Why not to use Smart types in a container? Pin
paresh_joe17-Sep-08 19:52
paresh_joe17-Sep-08 19:52 
GeneralRe: Why not to use Smart types in a container? Pin
followait17-Sep-08 23:15
followait17-Sep-08 23:15 
Questionvector resize question Pin
followait16-Sep-08 3:53
followait16-Sep-08 3:53 
AnswerRe: vector resize question [modified] Pin
George L. Jackson16-Sep-08 7:08
George L. Jackson16-Sep-08 7:08 
GeneralRe: vector resize question Pin
followait16-Sep-08 14:26
followait16-Sep-08 14:26 
GeneralRe: vector resize question [modified] Pin
George L. Jackson17-Sep-08 3:07
George L. Jackson17-Sep-08 3:07 
QuestionSTL serializetion Pin
followait15-Sep-08 15:56
followait15-Sep-08 15:56 
AnswerRe: STL serializetion Pin
Stuart Dootson15-Sep-08 21:36
professionalStuart Dootson15-Sep-08 21:36 
The difficulty has nothing to do with file streams - open them in binary mode (so they're just a stream of bytes, with no interpretation of things like CR-LFs) and you can store anything in them.

The serialisation problem making sure that all the objects you want to serialize have some suitable mechanism for doing so. It's also nice to be able to get those mechanisms in place in a reasonably non-intrusive manner.

Other implementation issues:
  • If an object is referenced from multiple places, making sure you recreate that object once when reading in a serialized object graph
  • If you have a collection (e.g. array or vector) of pointers to some base class, but the objects pointed at are of derived classes, you need to make sure that the derived class serialization functions are called
  • You need some way of identifying the type of objects you've serialized
  • Constructors - you really need a default (no parameter) constructor for all serializable classes, even if you don't really want one

The Boost.Serialization requirements[^] and
rationale[^] give more information about the issues involved.

I've created my own serialization code before (it must have been about 1998/9?). It was painful enough that I have no desire to do so again, so would use an existing library to get serialization.
GeneralRe: STL serializetion Pin
followait15-Sep-08 22:03
followait15-Sep-08 22:03 
QuestionProblems handling ATL Event from Microsoft Word Pin
kalukaley15-Sep-08 11:18
kalukaley15-Sep-08 11:18 
AnswerRe: Problems handling ATL Event from Microsoft Word Pin
Stuart Dootson15-Sep-08 21:44
professionalStuart Dootson15-Sep-08 21:44 
GeneralRe: Problems handling ATL Event from Microsoft Word Pin
kalukaley20-Sep-08 11:04
kalukaley20-Sep-08 11:04 
QuestionActiveX Control Resizing Pin
preeti sharma15-Sep-08 4:09
preeti sharma15-Sep-08 4:09 
QuestionSE_LMSHARE is failing if MS office 2007 Japanese IME is installed Pin
GnanaprakashJebaraj13-Sep-08 3:23
GnanaprakashJebaraj13-Sep-08 3:23 
QuestionHow to use ComboBox in ListView (for editing ListView) in WTL? Pin
smalti11-Sep-08 23:32
smalti11-Sep-08 23:32 
AnswerRe: How to use ComboBox in ListView (for editing ListView) in WTL? Pin
Amit Luniya25-Sep-08 22:18
Amit Luniya25-Sep-08 22:18 
AnswerRe: How to use ComboBox in ListView (for editing ListView) in WTL? Pin
Member 183477015-Oct-08 3:33
Member 183477015-Oct-08 3:33 
QuestionToolBar "affaire" Pin
Ritxi11-Sep-08 23:07
Ritxi11-Sep-08 23:07 
AnswerRe: ToolBar "affaire" Pin
Ritxi14-Sep-08 21:54
Ritxi14-Sep-08 21:54 
QuestionProblem with ATL IE plugin programming Pin
Robert Wang198310-Sep-08 5:19
Robert Wang198310-Sep-08 5:19 
Question[Message Deleted] Pin
arkiboys10-Sep-08 3:22
arkiboys10-Sep-08 3:22 
QuestionRe: PrintUIEntry Pin
led mike10-Sep-08 5:29
led mike10-Sep-08 5:29 
QuestionWindow.close() Close Dialog Box Pin
preeti sharma10-Sep-08 2:22
preeti sharma10-Sep-08 2:22 
QuestionHow to save/load a string in STL to/from a file? Pin
followait7-Sep-08 16:30
followait7-Sep-08 16:30 
AnswerRe: How to save/load a string in STL to/from a file? Pin
Stuart Dootson9-Sep-08 22:10
professionalStuart Dootson9-Sep-08 22:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.