python-module/cpplmodule.cc
/**
 * @return True of the nodeParameters fulfill the policy, False otherwise.
 */
@return True of the nodeParameters fulfill the policy, False otherwise.
@return True of the nodeParameters fulfill the policy False otherwise .
static PyObject *cpplmodule_evaluate(PyObject *self, PyObject *args)
{
  PyObject *retval;
  bool ret_bool;
  long long np_key, ps_key;
  int ret;
  PolicyStack *compressed_policy;
  NodeParameters *np;
  if (!PyArg_ParseTuple(args, "LL", &ps_key, &np_key)) {
    return NULL;
  }
  compressed_policy = ps_list.at(ps_key);
  np = np_list.at(np_key);
  ret_bool = cppl_evaluate(compressed_policy, np);
  if( ret_bool ) {
    ret = 1;
  } else {
    ret = 0;
  }
  retval = Py_BuildValue("i", ret);
  return retval;
}
static PyObject * cpplmodule_evaluate ( PyObject * self , PyObject * args ) { PyObject * retval ; bool ret_bool ; long long np_key , ps_key ; int ret ; PolicyStack * compressed_policy ; NodeParameters * np ; if ( ! PyArg_ParseTuple ( args , " " , & ps_key , & np_key ) ) { return NULL ; } compressed_policy = ps_list . at ( ps_key ) ; np = np_list . at ( np_key ) ; ret_bool = cppl_evaluate ( compressed_policy , np ) ; if ( ret_bool ) { ret = 1 ; } else { ret = 0 ; } retval = Py_BuildValue ( " " , ret ) ; return retval ; }
@return True of the nodeParameters fulfill the policy, False otherwise.
@return True of the nodeParameters fulfill the policy False otherwise .