| http://www.coin3d.org/ http://www.kongsberg.com/kogt/

Public Member Functions | Friends | List of all members
dimeOutput Class Reference

The dimeOutput class handles writing of DXF and DXB files. More...

`#include <dime/Output.h>`

## Public Member Functions

| dimeOutput ()
| ~dimeOutput ()
void | setCallback (const int numrecords, int(*cb)(float, void *), void *cbdata)
bool | setFileHandle (FILE *fp)
bool | setFilename (const char *const filename)
void | setBinary (const bool state=true)
bool | isBinary () const
bool | writeHeader ()
bool | writeGroupCode (const int groupcode)
bool | writeInt8 (const int8 val)
bool | writeInt16 (const int16 val)
bool | writeInt32 (const int32 val)
bool | writeFloat (const float val)
bool | writeDouble (const dxfdouble val)
bool | writeString (const char *const str)
int | getUniqueHandleId ()

## Friends

class | dimeModel

## Detailed Description

The dimeOutput class handles writing of DXF and DXB files.

## Constructor & Destructor Documentation

## ◆ dimeOutput()

dimeOutput::dimeOutput | ( |  | ) |

Constructor.

## ◆ ~dimeOutput()

dimeOutput::~dimeOutput | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ isBinary()

bool dimeOutput::isBinary | ( |  | ) | const

Returns if binary or ASCII will be used when writing.

## ◆ setBinary()

void dimeOutput::setBinary | ( | const bool | state = `true` | ) |

Sets binary (DXB) or ASCII (DXF) format. Currently only ASCII is supported.

## ◆ setCallback()

void dimeOutput::setCallback | ( | const int | num_records,
|  | int(*)(float, void *) | cb,
|  | void * | cbdata
| ) |  |

This method sets a callback function that is called with progress information. The first argument of the callback is a float in the range between 0 and 1. The second argument of the callback is the void * cbdata argument.

## ◆ setFileHandle()

bool dimeOutput::setFileHandle | ( | FILE * | fp | ) |

Sets the output stream. should be a valid file/stream, and it will not be closed in the destructor.

## ◆ setFilename()

bool dimeOutput::setFilename | ( | const char *const | filename | ) |

Sets the filename for the output file. The file will be opened, and true is returned if all was ok. The file is closed in the destructor.

## ◆ writeDouble()

bool dimeOutput::writeDouble | ( | const dxfdouble | val | ) |

Writes a double precision floating point number to the file.

Referenced by dimeSolid::write(), dimeTrace::write(), dimeLWPolyline::write(), dimeDoubleRecord::write(), dimeLine::write(), dimePoint::write(), dimeUCSTable::write(), dimeCircle::write(), dimeInsert::write(), dimeArc::write(), dimeEllipse::write(), dimeText::write(), dimeBlock::write(), dimeVertex::write(), dimeSpline::write(), dimePolyline::write(), dimeFaceEntity::writeCoords(), and dimeExtrusionEntity::writeExtrusionData().

## ◆ writeFloat()

bool dimeOutput::writeFloat | ( | const float | val | ) |

Writes a single precision floating point number to the file.

Referenced by dimeFloatRecord::write().

## ◆ writeGroupCode()

bool dimeOutput::writeGroupCode | ( | const int | groupcode | ) |

Writes a record group code to the file.

Referenced by dimeTableEntry::isOfType(), dimeEntity::preWrite(), dimeTablesSection::read(), dimeHeaderSection::setVariable(), dimeSolid::write(), dimeUnknownObject::write(), dimeTrace::write(), dimeUnknownClass::write(), dimeBlocksSection::write(), dimeLWPolyline::write(), dimeTable::write(), dimeLine::write(), dimePoint::write(), dimeUCSTable::write(), dimeLayerTable::write(), dimeClass::write(), dimeCircle::write(), dimeInsert::write(), dimeArc::write(), dimeRecord::write(), dimeModel::write(), dimeEllipse::write(), dime3DFace::write(), dimeText::write(), dimeBlock::write(), dimeVertex::write(), dimeSpline::write(), dimePolyline::write(), dimeFaceEntity::writeCoords(), dimeExtrusionEntity::writeExtrusionData(), dimeClassesSection::~dimeClassesSection(), dimeEntitiesSection::~dimeEntitiesSection(), dimeObjectsSection::~dimeObjectsSection(), and dimeUnknownSection::~dimeUnknownSection().

## ◆ writeHeader()

bool dimeOutput::writeHeader | ( |  | ) |

inline

This method does nothing now, but if binary files are supported in the future, it must be called.

Referenced by dimeModel::write().

## ◆ writeInt16()

bool dimeOutput::writeInt16 | ( | const int16 | val | ) |

Writes a 16 bit integer to the file.

Referenced by dimeEntity::preWrite(), dimeLWPolyline::write(), dimeTable::write(), dimeInt16Record::write(), dimeLayerTable::write(), dimeInsert::write(), dimeText::write(), dime3DFace::write(), dimeBlock::write(), dimeVertex::write(), dimeSpline::write(), and dimePolyline::write().

## ◆ writeInt32()

bool dimeOutput::writeInt32 | ( | const int32 | val | ) |

Writes a 32 bit integer to the file.

Referenced by dimeInt32Record::write(), dimeClass::write(), dimeInsert::write(), dimeVertex::write(), dimeSpline::write(), and dimePolyline::write().

## ◆ writeInt8()

bool dimeOutput::writeInt8 | ( | const int8 | val | ) |

Writes an 8 bit integer to the file.

Referenced by dimeInt8Record::write(), and dimeClass::write().

## ◆ writeString()

bool dimeOutput::writeString | ( | const char *const | str | ) |

Writes a nul-terminated string to the file.

Referenced by dimeTableEntry::isOfType(), dimeEntity::preWrite(), dimeTablesSection::read(), dimeHeaderSection::setVariable(), dimeUnknownClass::write(), dimeUnknownObject::write(), dimeBlocksSection::write(), dimeTable::write(), dimeUCSTable::write(), dimeLayerTable::write(), dimeStringRecord::write(), dimeClass::write(), dimeInsert::write(), dimeArc::write(), dimeModel::write(), dimeText::write(), dimeBlock::write(), dimePolyline::write(), dimeClassesSection::~dimeClassesSection(), dimeEntitiesSection::~dimeEntitiesSection(), dimeObjectsSection::~dimeObjectsSection(), and dimeUnknownSection::~dimeUnknownSection().

The documentation for this class was generated from the following files:

- Output.h
- Output.cpp

Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.