Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-01-2010, 02:40 PM   #3 (permalink)
Centurion Games
Registered Member
 
Centurion Games's Avatar
 
Join Date: Nov 2009
Location: Beaverton, OR
Posts: 119
Centurion Games is on a distinguished road
Default

Quote:
Originally Posted by rocotilos View Post
I want to know the equivalent of these classes in Obj-C:

BinaryWriter
StringCollection
MemoryStream

I am trying to basically create a file, bit by bit (from header, etc), I found a code in C#, some part of it I can make sense of it, but Im not sure the equivalent of the above classes/types of C# in Obj-C.

Any C# guru lurking in here, pls help... I would appreciate it very much!!

Thanks.

EDIT: darn it, i mistyped the subject. it is not "helo", but "help". Sorry.
I'm not sure of Obj C having familar things, but C does.

BinaryWriter is just equivalent to using fopen and fwrite, to open/create a binary file, and write values to it. (Int, float, short, bytes, etc, not classes/objects)

StringCollection is basically a linked list of null terminated strings. This could be done with Char *, STL String, or maybe NSStrings, I imagine written out to file, it includes a total number of strings, and a number of characters per each string entry.

MemoryStream, is essentially just a dynamically re-sizeable memory block or array that you stuff with values (int, short, float, etc). This can easily be done by just allocating a block of memory, and using memcpy, and resizing as needed.

If you post more specifics or the code itself, might be able to help more.
__________________
Centurion Games|@centuriongames

Last edited by Centurion Games; 02-01-2010 at 02:46 PM.
Centurion Games is offline   Reply With Quote
 

» Advertisements
» Online Users: 558
18 members and 540 guests
daunmi, ethanwa, givensur, Hassasin, headkaze, iconomania, iekei, ilmman, jbro, Joseph262, kasumar, lzwasyc, mariano_donati, Objective Zero, Sophie100, taylor202, w0rldsell3r, zenox
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,443
Threads: 94,029
Posts: 402,600
Top Poster: BrianSlick (7,978)
Welcome to our newest member, Joseph262
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:25 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.