コード例 #1
0
ファイル: GLShader.cpp プロジェクト: GUI-Graphics/engine
	void GLShader::fromFile(const char* filename)
	{
		std::ifstream file(filename);

		if (file.fail())
		{
			printf("cannot load shader: %s\n", filename);
			throw std::exception();
		}

		std::stringstream stream;
		stream << file.rdbuf();
		fromStr(stream.str().c_str());
	}
コード例 #2
0
ファイル: RuTask.cpp プロジェクト: saruna/incubator-trafodion
//--------------------------------------------------------------------------//
//	CRUTask::DumpGraphNode()
//
//	Called by CRUDependenceGraph::DumpGraph()
//
//	Prints the task's edges dump acceptable for the Dotty GUI
//
//--------------------------------------------------------------------------//
// LCOV_EXCL_START :dpm
void CRUTask::DumpGraphEdges(CDSString &to)
{
    if (0 == pSuccList_->GetCount())
    {
        return;
    }

    char fromChr[10],toChr[10];
    sprintf(fromChr,"%d",GetId());

    CDSString fromStr(fromChr);
    fromStr = "\t\t" + fromStr + " -> ";

    DSListPosition pos = pSuccList_->GetHeadPosition();
    while (NULL != pos)
    {
        CRUTask *pTask = pSuccList_->GetNext(pos);
        sprintf(toChr,"%d",pTask->GetId());
        to += fromStr + CDSString(toChr) + ";\n";
    }
}
コード例 #3
0
BeliefCell<N>::BeliefCell( const std::string &str ) {
	fromStr( str );
}