本文整理汇总了C++中TJNICache::DataType方法的典型用法代码示例。如果您正苦于以下问题:C++ TJNICache::DataType方法的具体用法?C++ TJNICache::DataType怎么用?C++ TJNICache::DataType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TJNICache
的用法示例。
在下文中一共展示了TJNICache::DataType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getJ
/*
* Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus
* Method: getDataTop
* Signature: ()Luk/ac/manchester/cs/factplusplus/DataTypePointer;
*/
JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getDataTop
(JNIEnv * env, jobject obj)
{
TRACE_JNI("getDataTop");
TJNICache* J = getJ(env,obj);
return J->DataType(J->EM->DataTop());
}
示例2: name
/*
* Class: uk_ac_manchester_cs_factplusplus_FaCTPlusPlus
* Method: getBuiltInDataType
* Signature: (Ljava/lang/String;)Luk/ac/manchester/cs/factplusplus/DataTypePointer;
*/
JNIEXPORT jobject JNICALL Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_getBuiltInDataType
(JNIEnv * env, jobject obj, jstring str)
{
TRACE_JNI("getBuiltInDataType");
TRACE_STR(env,str);
TJNICache* J = getJ(env,obj);
JString name(env,str);
std::string DTName(name());
if ( DTName == "http://www.w3.org/2000/01/rdf-schema#Literal" ||
DTName == "http://www.w3.org/2000/01/rdf-schema#anySimpleType" ||
DTName == "http://www.w3.org/2001/XMLSchema#anyType" ||
DTName == "http://www.w3.org/2001/XMLSchema#anySimpleType" )
return J->DataType(J->EM->DataTop());
if ( DTName == "http://www.w3.org/1999/02/22-rdf-syntax-ns#PlainLiteral" ||
DTName == "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" ||
DTName == "http://www.w3.org/2001/XMLSchema#string" ||
DTName == "http://www.w3.org/2001/XMLSchema#anyURI" ||
DTName == "http://www.w3.org/2001/XMLSchema#ID" )
return J->DataType(J->EM->getStrDataType());
if ( DTName == "http://www.w3.org/2001/XMLSchema#integer" ||
DTName == "http://www.w3.org/2001/XMLSchema#int" ||
DTName == "http://www.w3.org/2001/XMLSchema#long" ||
DTName == "http://www.w3.org/2001/XMLSchema#nonNegativeInteger" ||
DTName == "http://www.w3.org/2001/XMLSchema#positiveInteger" ||
DTName == "http://www.w3.org/2001/XMLSchema#negativeInteger" ||
DTName == "http://www.w3.org/2001/XMLSchema#short" ||
DTName == "http://www.w3.org/2001/XMLSchema#byte" )
return J->DataType(J->EM->getIntDataType());
if ( DTName == "http://www.w3.org/2001/XMLSchema#float" ||
DTName == "http://www.w3.org/2001/XMLSchema#double" ||
DTName == "http://www.w3.org/2001/XMLSchema#real" ||
DTName == "http://www.w3.org/2001/XMLSchema#decimal" )
return J->DataType(J->EM->getRealDataType());
if ( DTName == "http://www.w3.org/2001/XMLSchema#boolean" )
return J->DataType(J->EM->getBoolDataType());
if ( DTName == "http://www.w3.org/2001/XMLSchema#dateTimeAsLong" )
return J->DataType(J->EM->getTimeDataType());
std::stringstream err;
err << "Unsupported datatype '" << DTName.c_str() << "'";
Throw ( env, err.str().c_str() );
return (jobject)0;
}