0

I have to use the CAArchiver class for the serialization of the data coming from the .bin file in my iPhone project (I need to use it in a C++ code snippet). How do I do this?

I have also researched the following link: http://msdn.microsoft.com/en-us/library/caz3zy5s(v=vs.80).aspx. This appears to be used in .NET technology.

What am I supposed to do?

Chris Frederick
  • 5,482
  • 3
  • 36
  • 44
NIKHIL
  • 2,719
  • 1
  • 26
  • 50

2 Answers2

2

CArchive (as per your link) is part of the Microsoft Foundation Class Library. It's very unlikely that you will find an implementation for them on the iOS platform.

If you need only to provide a kind of serialization, Jigneshs answer is the way to go. If you need to be compatible to other output from CArchive then chances are that you will have to implement this by yourself.

Alfonso
  • 8,386
  • 1
  • 43
  • 63
  • actually i am having .bin format file none of the following line working for me .can you suggest how can i convert this bin file to serialize binary file and also refer the following link here c++ code for CAArchive is also given http://msdn.microsoft.com/en-us/library/dz8k76ze.aspx – NIKHIL Jun 30 '11 at 04:56
  • If you really have to read in an object generated by CArchive I believe your only way is to take a look a the serialization logic and reimplement it yourself. See also [this question](http://stackoverflow.com/questions/55369/reading-vc-carchive-binary-format-or-java-reading-cobarray) for a reference. – Alfonso Jul 01 '11 at 09:48
0

I do not know what you want:

but there is a class in iphone

NSData *data = [NSKeyedArchiver archivedDataWithRootObject:dictionary];

Where dictionary can be NSObject

NSObject *dictionary = [NSKeyedUnarchiver unarchiveObjectWithData:data];

Where data is a binary i.e. NSData

Using this, I think it will be helpful what you were looking for....

jigneshbrahmkhatri
  • 3,627
  • 2
  • 21
  • 33
  • I need to get the data from the binary file those should get serialize and CAArchive is used to serialize data check this link http://msdn.microsoft.com/en-us/library/dz8k76ze.aspx here check syntex for c++ – NIKHIL Jun 29 '11 at 13:23
  • how would you use it in iphone? – jigneshbrahmkhatri Jun 29 '11 at 13:25
  • using c++ code and i need to use following method CArchive ar( &f, CArchive::load); i don't know how? – NIKHIL Jun 29 '11 at 13:31