本文整理汇总了C++中TJNICache类的典型用法代码示例。如果您正苦于以下问题:C++ TJNICache类的具体用法?C++ TJNICache怎么用?C++ TJNICache使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TJNICache类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TRACE_JNI
/*
* Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus
* Method: getObjectValue
* Signature: (Luk/ac/manchester/cs/factplusplus/ObjectPropertyPointer;Luk/ac/manchester/cs/factplusplus/IndividualPointer;)Luk/ac/manchester/cs/factplusplus/ClassPointer;
*/
JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getObjectValue
(JNIEnv * env, jobject obj, jobject arg1, jobject arg2)
{
TRACE_JNI("getObjectValue");
TJNICache* J = getJ(env,obj);
return J->Class ( J->EM->Value ( getORoleExpr(env,arg1), getIndividualExpr(env,arg2) ) );
}
示例2: TRACE_JNI
/*
* Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus
* Method: askDataProperties
* Signature: (Luk/ac/manchester/cs/factplusplus/IndividualPointer;)[Luk/ac/manchester/cs/factplusplus/DataPropertyPointer;
*/
JNIEXPORT jobjectArray JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_askDataProperties
(JNIEnv * env, jobject obj, jobject arg)
{
TRACE_JNI("askDataProperties");
TRACE_ARG(env,obj,arg);
TJNICache* J = getJ(env,obj);
ReasoningKernel::NamesVector Rs;
PROCESS_QUERY ( J->K->getRelatedRoles ( getROIndividualExpr(env,arg), Rs, /*data=*/true, /*needI=*/false ) );
std::vector<TExpr*> acc;
for ( ReasoningKernel::NamesVector::const_iterator p = Rs.begin(), p_end = Rs.end(); p < p_end; ++p )
acc.push_back(J->getDName((*p)->getName()));
return J->buildArray ( acc, J->DataPropertyPointer );
}