void dimeClass::setApplicationName(const char * const appname, dimeMemHandler * const memhandler) { if (!memhandler) delete this->appName; DXF_STRCPY(memhandler, this->appName, appname); }
bool dimeStringRecord::setString(const char * const s, dimeMemHandler * const memhandler) { DXF_STRCPY(memhandler, this->string, s); return this->string != NULL; }
void dimeClass::setClassName(const char * const classname, dimeMemHandler * const memhandler) { if (!memhandler) delete this->className; DXF_STRCPY(memhandler, this->className, classname); }
/*! Sets the layer name. */ void dimeLayerTable::setLayerName(const char * name, dimeMemHandler * const memhandler) { if (this->layerName && memhandler == NULL) { delete this->layerName; } DXF_STRCPY(memhandler, this->layerName, name); }
bool dimeClass::copyRecords(dimeClass * const myclass, dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); bool ok = dimeRecordHolder::copyRecords(myclass, memh); if (ok && this->className) { DXF_STRCPY(memh, myclass->className, this->className); ok = myclass->className != NULL; } if (ok && this->appName) { DXF_STRCPY(memh, myclass->appName, this->appName); ok = myclass->className != NULL; } if (ok) { myclass->versionNumber = this->versionNumber; myclass->flag1 = this->flag1; myclass->flag2 = this->flag2; } return ok; }
bool dimeClass::handleRecord(const int groupcode, const dimeParam ¶m, dimeMemHandler * const memhandler) { switch (groupcode) { case 1: DXF_STRCPY(memhandler, this->className, param.string_data); return true; case 2: DXF_STRCPY(memhandler, this->appName, param.string_data); return true; case 90: this->versionNumber = param.int32_data; return true; case 280: this->flag1 = param.int8_data; return true; case 281: this->flag2 = param.int8_data; return true; } return false; }
dimeTableEntry * dimeLayerTable::copy(dimeModel * const model) const { dimeMemHandler *memh = model->getMemHandler(); dimeLayerTable *l = new(memh) dimeLayerTable; l->colorNumber = this->colorNumber; if (this->layerName) { DXF_STRCPY(memh, l->layerName, this->layerName); } if (this->layerInfo) { l->layerInfo = (dimeLayer*)model->addLayer(this->layerInfo->getLayerName(), DXFABS(this->colorNumber)); } if (!copyRecords(l, model)) { // check if allocated on heap. if (!memh) delete l; l = NULL; } return l; }
dimeUnknownObject::dimeUnknownObject(const char * const name, dimeMemHandler * const memhandler) { DXF_STRCPY(memhandler, this->objectName, name); }
dimeUnknownTable::dimeUnknownTable(const char * const name, dimeMemHandler * const memhandler) { DXF_STRCPY(memhandler, this->tableName, name); }
dimeUnknownEntity::dimeUnknownEntity(const char * const name, dimeMemHandler * const memhandler) { DXF_STRCPY(memhandler, this->entityName, name); }