当前位置: 首页>>代码示例>>Java>>正文


Java Pointer.getInt方法代码示例

本文整理汇总了Java中org.bridj.Pointer.getInt方法的典型用法代码示例。如果您正苦于以下问题:Java Pointer.getInt方法的具体用法?Java Pointer.getInt怎么用?Java Pointer.getInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bridj.Pointer的用法示例。


在下文中一共展示了Pointer.getInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getVersion

import org.bridj.Pointer; //导入方法依赖的package包/类
public String getVersion() {
    Pointer<Integer> major = Pointer.allocateInt();
    Pointer<Integer> minor = Pointer.allocateInt();
    Pointer<Integer> revision = Pointer.allocateInt();
    LIB.clingo_version(major, minor, revision);
    return "" + major.getInt() + "." + minor.getInt() + "." + revision.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:8,代码来源:Clingo.java

示例2: getConfiguration

import org.bridj.Pointer; //导入方法依赖的package包/类
public Configuration getConfiguration() throws ClingoException {
    Pointer<Pointer<clingo_configuration>> config = Pointer.allocatePointer(clingo_configuration.class);
    handleError(LIB.clingo_control_configuration(pointer, config), "Error reading the configuration!");
    Pointer<Integer> key = Pointer.allocateInt();
    handleError(LIB.clingo_configuration_root(config.get(), key), "Error reading the configuration root key!");
    return new Configuration(config.get(), key.getInt());
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:8,代码来源:Clingo.java

示例3: getSolveResult

import org.bridj.Pointer; //导入方法依赖的package包/类
public SolveResult getSolveResult() throws ClingoException {
    Pointer<Integer> ret = Pointer.allocateInt();
    handleError(LIB.clingo_solve_handle_get(pointer, ret), "Solve handle get solve result!");
    return new SolveResult(ret.getInt());
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:SolveHandle.java

示例4: getType

import org.bridj.Pointer; //导入方法依赖的package包/类
public int getType() throws ClingoException {
    Pointer<Integer> tmp = Pointer.allocateInt();
    handleError(LIB.clingo_configuration_type(pointer, key, tmp), "Error reading the configuration type!");
    return tmp.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:Configuration.java

示例5: size

import org.bridj.Pointer; //导入方法依赖的package包/类
@Override
public int size() {
    Pointer<SizeT> ret = Pointer.allocateSizeT();
    handleRuntimeError(LIB.clingo_theory_atoms_size(pointer, ret), "Error reading the theory atoms size!");
    return ret.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:7,代码来源:TheoryAtoms.java

示例6: getLevel

import org.bridj.Pointer; //导入方法依赖的package包/类
public int getLevel(int lit) throws ClingoException {
    Pointer<Integer> ret = Pointer.allocateInt();
    handleError(LIB.clingo_assignment_level(pointer, lit, ret), "Error reading the assignment level!");
    return ret.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:Assignment.java

示例7: getDecision

import org.bridj.Pointer; //导入方法依赖的package包/类
public int getDecision(int level) throws ClingoException {
    Pointer<Integer> ret = Pointer.allocateInt();
    handleError(LIB.clingo_assignment_decision(pointer, level, ret), "Error reading the assignment decision!");
    return ret.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:Assignment.java

示例8: get

import org.bridj.Pointer; //导入方法依赖的package包/类
@Override
public Configuration get(int index) {
    Pointer<Integer> subkey = Pointer.allocateInt();
    handleRuntimeError(LIB.clingo_configuration_array_at(pointer, key, index, subkey), "Error reading the configuration item in array at " + index + " position!");
    return new Configuration(pointer, subkey.getInt());
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:7,代码来源:ConfigurationList.java

示例9: size

import org.bridj.Pointer; //导入方法依赖的package包/类
public int size() throws ClingoException {
    Pointer<SizeT> ret = Pointer.allocateSizeT();
    handleError(LIB.clingo_symbolic_atoms_size(pointer, ret), "Error reading the symbolic atoms size!");
    return ret.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:SymbolicAtoms.java

示例10: get

import org.bridj.Pointer; //导入方法依赖的package包/类
public Configuration get(String name) {
    Pointer<Integer> subkey = Pointer.allocateInt();
    handleRuntimeError(LIB.clingo_configuration_map_at(pointer, key, Pointer.pointerToCString(name), subkey), "Error reading the configuration item in map by" + name + " key!");
    return new Configuration(pointer, subkey.getInt());
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:ConfigurationMap.java

示例11: getTerm

import org.bridj.Pointer; //导入方法依赖的package包/类
public TheoryTerm getTerm() throws ClingoException {
    Pointer<Integer> ret = Pointer.allocateInt();
    handleError(LIB.clingo_theory_atoms_atom_term(pointer, id, ret), "Error reading the theory atom term!");
    return new TheoryTerm(pointer, ret.getInt());
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:TheoryAtom.java

示例12: getLiteral

import org.bridj.Pointer; //导入方法依赖的package包/类
public int getLiteral() throws ClingoException {
    Pointer<Integer> ret = Pointer.allocateInt();
    handleError(LIB.clingo_theory_atoms_atom_literal(pointer, id, ret), "Error reading the theory atom literal!");
    return ret.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:TheoryAtom.java

示例13: initSolverLiteral

import org.bridj.Pointer; //导入方法依赖的package包/类
public int initSolverLiteral(int lit) throws ClingoException {
    Pointer<Integer> ret = Pointer.allocateInt();
    handleError(LIB.clingo_propagate_init_solver_literal(pointer, lit, ret), "Error reading the progagete init solver literal!");
    return ret.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:PropagateInit.java

示例14: addAtom

import org.bridj.Pointer; //导入方法依赖的package包/类
public int addAtom() throws ClingoException {
    Pointer<Integer> ret = Pointer.allocateInt();
    handleError(LIB.clingo_backend_add_atom(pointer, ret), "Error add the atom to the backend!");
    return ret.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:Backend.java

示例15: addLiteral

import org.bridj.Pointer; //导入方法依赖的package包/类
public int addLiteral() throws ClingoException {
    Pointer<Integer> ret = Pointer.allocateInt();
    handleError(LIB.clingo_propagate_control_add_literal(pointer, ret), "Error add the literal to the propagate control!");
    return ret.getInt();
}
 
开发者ID:lorislab,项目名称:clingo4j,代码行数:6,代码来源:PropagateControl.java


注:本文中的org.bridj.Pointer.getInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。