Java Code Examples for org.bridj.Pointer.pointerToAddress()

The following are Jave code examples for showing how to use pointerToAddress() of the org.bridj.Pointer class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: clingo4j   File: ClingoLibrary.java   View Source Code Vote up 2 votes
/**
 * ! Convert error code into string.<br>
 * Original signature : <code>const char* clingo_error_string(clingo_error_t)</code><br>
 * <i>native declaration : src/main/clingo/lib/c/clingo.h:106</i>
 */
@Name("clingo_error_string") 
public Pointer<Byte > clingo_error_string(int code) {
	return (Pointer)Pointer.pointerToAddress(clingo_error_string$2(code), Byte.class);
}
 
Example 2
Project: clingo4j   File: ClingoLibrary.java   View Source Code Vote up 2 votes
/**
 * ! @return error message or NULL<br>
 * Original signature : <code>const char* clingo_error_message()</code><br>
 * <i>native declaration : src/main/clingo/lib/c/clingo.h:114</i>
 */
@Name("clingo_error_message") 
public Pointer<Byte > clingo_error_message() {
	return (Pointer)Pointer.pointerToAddress(clingo_error_message$2(), Byte.class);
}
 
Example 3
Project: clingo4j   File: ClingoLibrary.java   View Source Code Vote up 2 votes
/**
 * ! Convert warning code into string.<br>
 * Original signature : <code>const char* clingo_warning_string(clingo_warning_t)</code><br>
 * <i>native declaration : src/main/clingo/lib/c/clingo.h:133</i>
 */
@Name("clingo_warning_string") 
public Pointer<Byte > clingo_warning_string(int code) {
	return (Pointer)Pointer.pointerToAddress(clingo_warning_string$2(code), Byte.class);
}
 
Example 4
Project: clingo4j   File: ClingoLibrary.java   View Source Code Vote up 2 votes
/**
 * ! @return the name of the signature<br>
 * Original signature : <code>const char* clingo_signature_name(clingo_signature_t)</code><br>
 * <i>native declaration : src/main/clingo/lib/c/clingo.h:227</i>
 */
@Name("clingo_signature_name") 
public Pointer<Byte > clingo_signature_name(long signature) {
	return (Pointer)Pointer.pointerToAddress(clingo_signature_name$2(signature), Byte.class);
}
 
Example 5
Project: clingo4j   File: ClingoLibrary.java   View Source Code Vote up 2 votes
/**
 * ! @return the assignment<br>
 * Original signature : <code>clingo_assignment_t* clingo_propagate_control_assignment(clingo_propagate_control_t*)</code><br>
 * <i>native declaration : src/main/clingo/lib/c/clingo.h:1382</i>
 */
@Name("clingo_propagate_control_assignment") 
public Pointer<ClingoLibrary.clingo_assignment > clingo_propagate_control_assignment(Pointer<ClingoLibrary.clingo_propagate_control > control) {
	return (Pointer)Pointer.pointerToAddress(clingo_propagate_control_assignment(Pointer.getPeer(control)), ClingoLibrary.clingo_assignment.class);
}
 
Example 6
Project: SteamAudio-Java   File: IPLAllocateFunction.java   View Source Code Vote up 2 votes
/**
 * Prototype of a callback that allocates memory. This is usually specified to let Phonon use a custom memory
 * allocator. The default behavior is to use the OS-dependent aligned version of {@code malloc}.
 *
 * @param size      The number of bytes to allocate.
 * @param alignment The alignment (in bytes) of the start address of the allocated memory.
 *
 * @return Pointer to the allocated block of memory, or {@code NULL} if allocation failed.
 */
public Pointer<?> apply(@Ptr long size, @Ptr long alignment) {
    return Pointer.pointerToAddress(apply$2(size, alignment));
}