Beispiel #1
0
// Initialises the memory using the file provided.
DataSetInitStatus init(char* fileName, char* properties) {
    DataSetInitStatus status = DATA_SET_INIT_STATUS_SUCCESS;
    status = readFile(fileName);
    if (status != DATA_SET_INIT_STATUS_SUCCESS) {
        return status;
    }

	// If no properties are provided then use all of them.
	if (properties == NULL || strlen(properties) == 0)
		initAllProperties();
	else
		initSpecificProperties(properties);

	return status;
}
    void AbstractPipeline::init() {
        _dataContainer->s_dataAdded.connect(this, &AbstractPipeline::onDataContainerDataAdded);

        _painter->init();
        initAllProperties();

        // initialize all processors:
        for (std::vector<AbstractProcessor*>::iterator it = _processors.begin(); it != _processors.end(); ++it) {
            try {
                (*it)->init();
            }
            catch (cgt::Exception& e) {
                LERROR("Caught Exception during initialization of processor: " << e.what());
            }
        }

        // use trigger signal to enforce blocking call
        s_init.triggerSignal();
    }