124 bool getBuffer(
void *&bufPointer,
size_t &nBytes)
const;
180 { indentLevel += amount; }
182 { indentLevel -= amount; }
230 { annotation = bits; }
232 {
return (isCompact() || isBinary()) ? 0 : annotation; }
265 bool isToBuffer()
const
269 size_t bytesInBuf()
const
270 {
return (curBuf - (
char *) buffer); }
273 bool makeRoomInBuf(
size_t nBytes);
276 bool makeRoomInTmpBuf(
size_t nBytes);
280 int addReference(
const SoBase *base);
284 int findReference(
const SoBase *base)
const;
287 void convertShort(
short s,
char *to);
288 void convertInt32(
int32_t l,
char *to);
289 void convertFloat(
float f,
char *to);
290 void convertDouble(
double d,
char *to);
291 void convertShortArray(
short *from,
char *to,
int len);
292 void convertInt32Array(
int32_t *from,
char *to,
int len);
293 void convertFloatArray(
float *from,
char *to,
int len);
294 void convertDoubleArray(
double *from,
char *to,
int len);
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
void * SoOutputReallocCB(void *ptr, size_t newSize)
This is a dictionary mapping (size_t) integer keys to (void *) data pointers.
Character string stored in a hash table.
Class for smart character strings.
Base class for all nodes, paths, and engines.
Scene graph database class.
Used to write Inventor data files.
void setBuffer(void *bufPointer, size_t initSize, SoOutputReallocCB *reallocFunc, int32_t offset=0)
Sets up memory buffer to write to, initial size, reallocation function (which is called if there is n...
static SbString getDefaultASCIIHeader()
Returns the string representing the default ASCII header.
void setFilePointer(FILE *newFP)
Sets file pointer to write to.
void writeBinaryArray(int32_t *l, int length)
void writeBinaryArray(float *f, int length)
SoOutput()
Constructor and destructor.
FILE * getFilePointer() const
Returns the file pointer in use, or NULL if using a buffer.
void writeBinaryArray(double *d, int length)
bool isBinary() const
Returns current state of binary flag.
void write(unsigned int i)
void setBinary(bool flag)
Sets whether output should be ASCII (default) or binary.
void decrementIndent(int amount=1)
Annotations
Bit mask for various output annotations.
size_t getBufferSize() const
The total number of bytes allocated to a memory buffer may be larger than the number of bytes written...
~SoOutput()
Constructor and destructor.
void setCompact(bool flag)
Prevents header and extra white space from being written.
void setAnnotation(uint32_t bits)
void write(const SbName &n)
void incrementIndent(int amount=1)
Increments/decrements indentation level by amount (default 1).
static SbString getDefaultBinaryHeader()
Returns the string representing the default binary header.
void write(unsigned short s)
bool getBuffer(void *&bufPointer, size_t &nBytes) const
Returns pointer to memory buffer being written to and the new size of the buffer.
void resetHeaderString()
Resets the header for output files to be the default header.
void writeBinaryArray(unsigned char *c, int length)
void closeFile()
Closes current file if opened with openFile().
SoOutput(SoOutput *dictOut)
Constructor and destructor.
void write(float f)
was ... C-api: name=writeInt32 but typedef makes this redundant void write(int32_t l); was ....
void write(char c)
Writes item of particular type to current file pointer/buffer.
void write(const char *s)
void reset()
Resets things for writing to a new file or changing files.
void setStage(Stage stage)
Sets/returns current stage of operation of action.
bool openFile(const char *fileName)
Opens named file, sets file pointer to result. This returns FALSE on error.
void setHeaderString(const SbString &str)
Sets the header for output files.
void resetBuffer()
Resets buffer for output again. Output starts over at beginning of buffer.
void indent()
Writes indentation to file/buffer based on current indentation level.
void write(const SbString &s)
Stage
Enum that determines stage of operation of writing.
@ COUNT_REFS
Count write references.
void setFloatPrecision(int precision)
Sets the precision for writing floating point numbers, i.e.