void deleteConceptBulk(FormalConceptIntentBulkList* rootNode) { RETURN_IF_ZERO(rootNode); RETURN_IF_ZERO(*rootNode); FormalConceptIntentBulkList l; l = *rootNode; *rootNode = 0; do { for (int var = 0; var < l->size; ++var) { deleteConceptChunk(&(l->chunks[var])); } FormalConceptIntentBulkList next; next = l->next; free(l->chunks); free(l); l = next; } while (l != 0); }
void deleteFormalContext(FormalContext* ctx) { RETURN_IF_ZERO(ctx); RETURN_IF_ZERO(*ctx); myFormalContext *c; c = (myFormalContext*) *ctx; *ctx = 0; for (int var = 0; var < c->attributes; ++var) { free(c->attributeNames[var]); } for (int var = 0; var < c->objects; ++var) { free(c->objectNames[var]); } free(c->objectNames); free(c->attributeNames); free(c->incidence); free(c); }
void deleteConceptChunk(myFormalConceptIntentChunk** c) { RETURN_IF_ZERO(c); RETURN_IF_ZERO(*c); free((*c)->incidence); free(*c); *c = 0; }
void IAudioSource::Stop() { RETURN_IF_ZERO(mSource); AudioDevice::Instance().StopSource(mSource); mSource=AudioDevice::Instance().RecycleSource(mSource); FireEndEvent(); }
void IAudioSource::Resume() { RETURN_IF_ZERO(mSource); if (GetState()==AudioSourceState::Paused) { AudioDevice::Instance().PlaySource(mSource); } }
void writeFormalContext(FormalContext ctx, const char* filename) { RETURN_IF_ZERO(ctx); RETURN_IF_ZERO(filename); FILE* file; file = fopen(filename, "w"); RETURN_IF_ZERO(file); myFormalContext *c; c = (myFormalContext*) ctx; fprintf(file, "B\n\n%d\n%d\n\n", c->objects, c->attributes); for (int var = 0; var < c->objects; ++var) { fputs(c->objectNames[var], file); fputs("\n", file); } for (int var = 0; var < c->attributes; ++var) { fputs(c->attributeNames[var], file); fputs("\n", file); } for (int g = 0; g < c->objects; ++g) { for (int m = 0; m < c->attributes; ++m) { if ( gIm(g, c, m)) fputs("X", file); else fputs(".", file); } fputs("\n", file); } fclose(file); }
void IAudioSource::SetByteOffset(uint val) { RETURN_IF_ZERO(mSource); AudioDevice::Instance().SetSourceIntegerProperty(mSource,AudioSourceIntegerProperty::ByteOffset,val); }
void IAudioSource::Rewind() { RETURN_IF_ZERO(mSource); AudioDevice::Instance().RewindSource(mSource); }
void IAudioSource::Pause() { RETURN_IF_ZERO(mSource); AudioDevice::Instance().PauseSource(mSource); }