예제 #1
0
	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
//--------------------------------------------------------------------------//
//	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";
    }
}
BeliefCell<N>::BeliefCell( const std::string &str ) {
	fromStr( str );
}