NAME
hwWriteAscii(3) - write a HoverWare object to an output file
SYNOPSIS
#include "hw.h"
int hwWriteAscii( hwObject obj, FILE *f )
DESCRIPTION
The hwWriteAscii function is used to write a HoverWare object and
all of its children to the given stdio FILE. It does this by using
the props table of the object, and the inquire method. It will
recursively traverse any un-named hwObject properties of this
object. Named hwObject properties are referred to by name.
RETURN VALUE
If the write succeeded, 1 is returned. Otherwise, 0 is returned.
ERRORS
None
EXAMPLES
/* Write out a textured sphere */
hwObject
sphere, tm;
tm = hwTexture->create( hwTexture );
tm->modify( tm, hwStrFileName, HW_TYPE_STRING, "foo.ppm" );
tm->name = "FooTexture";
sphere = hwSphere->create( hwSphere );
sphere->modify( sphere, hwStrTexture, HW_TYPE_OBJECT, tm );
(void)hwWriteAscii( tm, stdout );
(void)hwWriteAscii( sphere, stdout );
/* This produces the following output: */
hwTexture FooTexture {
FileName = "foo.ppm"
}
hwSphere {
Texture = FooTexture
}
SEE ALSO
hwParseFile(3)