本文整理汇总了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();
}
示例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());
}
示例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());
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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());
}
示例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();
}
示例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());
}
示例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());
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}