[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cout<< or .toString() in Objective-c?
From: |
Laszlo Gulyas |
Subject: |
Re: cout<< or .toString() in Objective-c? |
Date: |
Mon, 29 May 2000 17:23:16 +0200 |
Hi Ralf,
Thanks for the note. I am not sure, however, wether I was clear enough.
What I would like to do is to have a method or tool that can be applied
to an arbitrary object and can dump information about on the given
object to a file.
E.g., in Java you can do the following:
Object arbitraryObject;
System.out.println(arbitraryObject); // calls arbitraryObject.toString()
What is not clear in your example is that what method to call on my object
to dump itself to myStream in your example.
Thanks, Gulya
On Mon, 29 May 2000 16:46:28 +0200, address@hidden wrote:
>Laszlo Gulyas:
>> I wonder wether there is a tool like cout<< (in C++) or like .toString() (in
>> Java)?
>>
>> What I would like to do is to generate code that outputs to a file all
>> information
>> an arbitrary object (in a Swarm simulation) provides of itself. Any ideas to
>> achieve
>> this would be appreciated.
>
> FILE *fp;
> id myStream = [OutputStream create: [self getZone] setFileStream: fp];
> [myStream catC: someCharPointer];
>
>
>ralf
>--
>http://ME.IN-berlin.de/~rws/
>
> ==================================
> Swarm-Support is for discussion of the technical details of the day
> to day usage of Swarm. For list administration needs (esp.
> [un]subscribing), please send a message to <address@hidden>
> with "help" in the body of the message.
--
Laszlo Gulyas address@hidden
AI Laboratory http://www.sztaki.hu/~gulyas/
Computer and Automation Research Inst. H-1111, Budapest, Kende u. 13-17.
Hungarian Academy of Sciences * 36 1 209-6194
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.