LoaderDatabaseConnection::~LoaderDatabaseConnection()
{
    unprepare("WCIWriteByteA");
    unprepare("GetPlaceName");
    unprepare("InfoParameterUnit");
    perform ( EndWci( ), 1 );

    delete config_;
}
示例#2
0
 void remove_sub_supers() {
   std::for_each(m_subs.begin(), m_subs.end(), // C++11
                 [=] (Base * sub) {
                   sub->remove_super(this); // uplink
                 });
     unprepare();
 }
示例#3
0
//------------------------------------------------------------------------
bool HostProcessData::prepare (IComponent& component, int32 bufferSamples, int32 _symbolicSampleSize)
{
	if (checkIfReallocationNeeded (component, bufferSamples, _symbolicSampleSize))
	{
		unprepare ();

		symbolicSampleSize = _symbolicSampleSize;
		channelBufferOwner = bufferSamples > 0;

		numInputs = createBuffers (component, inputs, kInput, bufferSamples);
		numOutputs = createBuffers (component, outputs, kOutput, bufferSamples);
	}
	else
	{
		// reset silence flags
		for (int32 i = 0; i < numInputs; i++)
		{
			inputs[i].silenceFlags = 0;
		}
		for (int32 i = 0; i < numOutputs; i++)
		{
			outputs[i].silenceFlags = 0;
		}
	}

	return true;
}
示例#4
0
void ADLSearchManager::finalizeDestinationDirectories(DestDirList& destDirVector, DirectoryListing::Directory* root)
{
	string szDiscard("<<<" + STRING(ADLS_DISCARD) + ">>>");
	
	// Add non-empty destination directories to the top level
	for (auto id = destDirVector.begin(); id != destDirVector.end(); ++id)
	{
		if (id->dir->m_files.empty() && id->dir->directories.empty())
		{
			safe_delete(id->dir);
		}
		else if (stricmp(id->dir->getName(), szDiscard) == 0)
		{
			safe_delete(id->dir);
		}
		else
		{
			root->directories.push_back(id->dir);
		}
	}
	
	for (auto ip = collection.begin(); ip != collection.end(); ++ip)
	{
		ip->unprepare();
	}
}
示例#5
0
void MySqlPreparedStatement::prepare()
{
	if(isPrepared())
		return;

	//remove old binds
	unprepare();

	//create statement object
	_myStmt = _mySqlConn._MySQLStmtInit();
	poco_assert(_myStmt != nullptr);

	//prepare statement
	_mySqlConn._MySQLStmtPrepare(*this, _myStmt, _stmtSql, _stmtLen);

	//Get the parameter count from the statement
	_numParams = mysql_stmt_param_count(_myStmt);

	//Fetch result set meta information
	_myResMeta = mysql_stmt_result_metadata(_myStmt);
	//if we do not have result metadata
	if (!_myResMeta && (!strnicmp("select",_stmtSql,6)))
		poco_bugcheck_msg(Poco::format("SQL: no meta information for '%s', ERROR %s",this->getSqlString(),this->lastErrorDescr()).c_str());

	//set up bind input buffers
	_myArgs.resize(_numParams);
	for (size_t i=0;i<_myArgs.size();i++)
		memset(&_myArgs[i], 0, sizeof(MYSQL_BIND));

	//check if we have a statement which returns result sets
	if(_myResMeta)
	{
		//our statement is a query
		_isQuery = true;
		//get number of columns of the query
		_numColumns = mysql_num_fields(_myResMeta);

		//set up bind output buffers
		_myRes.resize(_numColumns);
		for (size_t i=0;i<_myRes.size();i++)
		{
			MYSQL_BIND& curr = _myRes[i];
			memset(&curr,0,sizeof(MYSQL_BIND));
			//TODO: implement fetching results from statements
		}
	}

	_prepared = true;
}
示例#6
0
MediaRecorderImpl::~MediaRecorderImpl()
{
	medvdbg("MediaRecorderImpl::~MediaRecorderImpl()\n");
	if (mCurState > RECORDER_STATE_IDLE) {
		if (unprepare() != RECORDER_OK) {
			meddbg("unprepare failed\n");
		}
	}

	if (mCurState == RECORDER_STATE_IDLE) {
		if (destroy() != RECORDER_OK) {
			meddbg("destroy failed\n");
		}
	}
}
示例#7
0
	bool Shader::prepare()
	{
		// Preparation or load was attempted already but failed
		if (mFailedToLoad) return false;

		// Already prepared?
		if (mPrepared) return true;

		// If no file name was specified something with curiously wrong
		if (mFileName.empty())
		{
			mFailedToLoad = true;
			Log::error("Failed to load mesh '%s'", mFileName.c_str());
			return false;
		}

		// Unload any previous stuff just in case
		unprepare();

		mShaderFile = new ShaderFile();
		if (!mShaderFile)
		{
			mFailedToLoad = true;
			return false;
		}

		if (!mShaderFile->addShader(mFileName, mDefine))
		{
			unprepare();
			mFailedToLoad = true;
			return false;
		}

		mPrepared = true;
		return true;
	}
示例#8
0
MySqlPreparedStatement::~MySqlPreparedStatement()
{
	unprepare();
}
示例#9
0
//------------------------------------------------------------------------
// HostProcessData
//------------------------------------------------------------------------
HostProcessData::~HostProcessData ()
{
	unprepare ();
}
示例#10
0
	Shader::~Shader()
	{
		unprepare();
		unload();
	}