Пример #1
0
bool ScMemoryContext::getEdgeInfo(ScAddr const & edgeAddr, ScAddr & outSourceAddr, ScAddr & outTargetAddr) const
{
	check_expr(isValid());
	if (sc_memory_get_arc_info(mContext, *edgeAddr, &outSourceAddr.mRealAddr, &outTargetAddr.mRealAddr) != SC_RESULT_OK)
	{
		outSourceAddr.reset();
		outTargetAddr.reset();

		return false;
	}
		
	return true;
}
Пример #2
0
ScAddr ScMemoryContext::getEdgeTarget(ScAddr const & edgeAddr) const
{
	check_expr(isValid());
	ScAddr addr;
	if (sc_memory_get_arc_end(mContext, edgeAddr.mRealAddr, &addr.mRealAddr) != SC_RESULT_OK)
		addr.reset();

	return addr;
}
Пример #3
0
bool ScMemoryContext::helperResolveSystemIdtf(std::string const & sysIdtf, ScAddr & outAddr, bool bForceCreation /*= false*/)
{
	check_expr(isValid());
    outAddr.reset();
    bool result = helperFindBySystemIdtf(sysIdtf, outAddr);
    if (!result && bForceCreation)
    {
        outAddr = createNode(sc_type_const);
        if (outAddr.isValid())
            result = helperSetSystemIdtf(sysIdtf, outAddr);
    }
    return result;
}