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

Public Member Functions | Protected Attributes | List of all members
dimeStringRecord Class Reference

The dimeStringRecord class is a container class for string records. More...

`#include <dime/records/StringRecord.h>`

Inheritance diagram for dimeStringRecord:

## Public Member Functions

| dimeStringRecord (const int group_code=0)
virtual | ~dimeStringRecord ()
virtual dimeRecord * | copy (dimeMemHandler *const mh) const
virtual void | setValue (const dimeParam &param, dimeMemHandler *const memhandler=NULL)
virtual void | getValue (dimeParam &param) const
void | setStringPointer (char *const s)
bool | setString (const char *const s, dimeMemHandler *const memhandler=NULL)
char * | getString ()
bool | isEndOfSectionRecord () const
bool | isEndOfFileRecord () const
int | typeId () const
bool | read (dimeInput *const in)
bool | write (dimeOutput *const out)
Public Member Functions inherited from dimeRecord
| dimeRecord (const int group_code)
virtual | ~dimeRecord ()
void | setGroupCode (const int group_code)
int | getGroupCode () const
virtual void | print () const
Public Member Functions inherited from dimeBase
| dimeBase (void)
virtual | ~dimeBase ()
virtual bool | isOfType (const int thetypeid) const
void * | operator new (size_t size, dimeMemHandler *memhandler=NULL, const int alignment=4)
void | operator delete (void *ptr)

## Protected Attributes

char * | string
Protected Attributes inherited from dimeRecord
int | groupCode

## Additional Inherited Members

Public Types inherited from dimeBase

enum

{
dimeBaseType = 1, dimeRecordType, dimeStringRecordType, dimeFloatRecordType,
dimeDoubleRecordType, dimeInt8RecordType, dimeInt16RecordType, dimeInt32RecordType,
dimeHexRecordType, dimeRecordHolderType, dimeClassType, dimeUnknownClassType,
dimeObjectType, dimeUnknownObjectType, dimeEntityType, dimeUnknownEntityType,
dimePolylineType, dimeVertexType, dimeFaceEntityType, dimeExtrusionEntityType,
dime3DFaceType, dimeSolidType, dimeTraceType, dimeLineType,
dimeTextType, dimePointType, dimeBlockType, dimeInsertType,
dimeCircleType, dimeArcType, dimeLWPolylineType, dimeEllipseType,
dimeSplineType, dimeSectionType, dimeUnknownSectionType, dimeEntitiesSectionType,
dimeBlocksSectionType, dimeTablesSectionType, dimeHeaderSectionType, dimeClassesSectionType,
dimeObjectsSectionType, dimeTableType, dimeTableEntryType, dimeUnknownTableType,
dimeUCSTableType, dimeLayerTableType, dimeLastTypeTag
}

Static Public Member Functions inherited from dimeRecord
static bool | readRecordData (dimeInput *const in, const int group_code, dimeParam &param)
static dimeRecord * | readRecord (dimeInput *const in)
static dimeRecord * | createRecord (const int group_code, dimeMemHandler *const memhandler)
static dimeRecord * | createRecord (const int group_code, const dimeParam &param, dimeMemHandler *const memhandler)
static int | getRecordType (const int group_code)

## Detailed Description

The dimeStringRecord class is a container class for string records.

## Constructor & Destructor Documentation

## ◆ dimeStringRecord()

dimeStringRecord::dimeStringRecord | ( | const int | group_code = `0` | ) |

Constructor.

Referenced by copy().

## ◆ ~dimeStringRecord()

dimeStringRecord::~dimeStringRecord | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## ◆ copy()

dimeRecord * dimeStringRecord::copy | ( | dimeMemHandler *const | memhandler | ) | const

virtual

Returns a copy of this record.

Implements dimeRecord.

References dimeStringRecord(), and setString().

## ◆ getString()

char * dimeStringRecord::getString | ( |  | ) |

Returns a pointer to the string.

Referenced by dimeTable::insertTableRecord().

## ◆ getValue()

void dimeStringRecord::getValue | ( | dimeParam & | param | ) | const

virtual

Returns the value of this record.

Implements dimeRecord.

## ◆ isEndOfFileRecord()

bool dimeStringRecord::isEndOfFileRecord | ( |  | ) | const

virtual

Returns true if this records is an end of file record.

Reimplemented from dimeRecord.

## ◆ isEndOfSectionRecord()

bool dimeStringRecord::isEndOfSectionRecord | ( |  | ) | const

virtual

Returns true if this record is an end of section record.

Reimplemented from dimeRecord.

## ◆ read()

bool dimeStringRecord::read | ( | dimeInput *const | in | ) |

virtual

This function will read the record from the dimeInput file.

Implements dimeRecord.

References dimeInput::getMemHandler(), dimeInput::readString(), and setString().

## ◆ setString()

bool dimeStringRecord::setString | ( | const char *const | s,
|  | dimeMemHandler *const | memhandler = `NULL`
| ) |  |

Will store a copy of string s. If memhandler != NULL, it will be used to allocate the needed memory. If memhandler == NULL, the memory will be allocated from the heap.

Referenced by copy(), read(), and dimeHeaderSection::setVariable().

## ◆ setStringPointer()

void dimeStringRecord::setStringPointer | ( | char *const | s | ) |

Sets the objects string pointer to point to 's'. Be aware that if the destructor is called for this object, the object will attempt to delete the string.

See also
  dimeStringRecord::setString().

## ◆ setValue()

void dimeStringRecord::setValue | ( | const dimeParam & | param,
|  | dimeMemHandler *const | memhandler = `NULL`
| ) |  |

virtual

Sets the value of this record. The memory handler is needed by dimeStringRecord.

Implements dimeRecord.

References dimeMemHandler::stringAlloc().

## ◆ typeId()

int dimeStringRecord::typeId | ( |  | ) | const

virtual

This virtual function will return the type of the record.

Implements dimeRecord.

## ◆ write()

bool dimeStringRecord::write | ( | dimeOutput *const | out | ) |

virtual

This function will write the record to the dimeOutput file.

Reimplemented from dimeRecord.

References dimeRecord::write(), and dimeOutput::writeString().

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

- StringRecord.h
- StringRecord.cpp

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