Ocean
Ocean::JNI::BaseJni Class Reference

This class implements a base native interface. More...

Static Public Member Functions

static bool initialize (const std::string &messageOutputType)
 Initializes the Ocean framework. More...
 
static bool initialize (const Messenger::MessageOutput messageOutputType, const std::string &outputFile)
 Initializes the Ocean framework. More...
 
static bool forceProcessorCoreNumber (const unsigned int cores)
 Forces a specific number of processor cores. More...
 
static bool setWorkerPoolCapacity (const unsigned int capacity)
 Sets or changes the maximal capacity of the worker pool. More...
 
static void debug (const std::string &message)
 Java native interface function to forward a debug message to the framework. More...
 
static void information (const std::string &message)
 Java native interface function to forward an information message to the framework. More...
 
static void warning (const std::string &message)
 Java native interface function to forward a warning message to the framework. More...
 
static void error (const std::string &message)
 Java native interface function to forward an error message to the framework. More...
 
static std::string popMessages ()
 Pops all messages that a currently waiting in the message queue. More...
 

Detailed Description

This class implements a base native interface.

Member Function Documentation

◆ debug()

static void Ocean::JNI::BaseJni::debug ( const std::string &  message)
static

Java native interface function to forward a debug message to the framework.

Parameters
messageThe debug message to forward

◆ error()

static void Ocean::JNI::BaseJni::error ( const std::string &  message)
static

Java native interface function to forward an error message to the framework.

Parameters
messageThe error message to forward

◆ forceProcessorCoreNumber()

static bool Ocean::JNI::BaseJni::forceProcessorCoreNumber ( const unsigned int  cores)
static

Forces a specific number of processor cores.

Parameters
coresCPU cores to be forced during initialization
Returns
True, if succeeded

◆ information()

static void Ocean::JNI::BaseJni::information ( const std::string &  message)
static

Java native interface function to forward an information message to the framework.

Parameters
messageThe information message to forward

◆ initialize() [1/2]

static bool Ocean::JNI::BaseJni::initialize ( const Messenger::MessageOutput  messageOutputType,
const std::string &  outputFile 
)
static

Initializes the Ocean framework.

Parameters
messageOutputTypeThe type of the message output to be used.
outputFileThe name of the file to which messages will be written, 'messageOutputType' must contain 'OUTPUT_FILE', empty otherwise
Returns
True, if succeeded

◆ initialize() [2/2]

static bool Ocean::JNI::BaseJni::initialize ( const std::string &  messageOutputType)
static

Initializes the Ocean framework.

Several individual message output types can be specified and combined:

  • "STANDARD": To write all messages to the standard output (e.g., std::cout on desktop platforms, or Android logcat on Android platforms).
  • "QUEUED": To queue all messages and to explicitly pop the messages later (e.g., to display messages in a debug window).
  • <filename>: To write all messages to a define file.
    Parameters
    messageOutputTypeThe type of the message output to be used, empty to use 'STANDARD'
    Returns
    True, if succeeded

◆ popMessages()

static std::string Ocean::JNI::BaseJni::popMessages ( )
static

Pops all messages that a currently waiting in the message queue.

Returns
The messages that have been popped.

◆ setWorkerPoolCapacity()

static bool Ocean::JNI::BaseJni::setWorkerPoolCapacity ( const unsigned int  capacity)
static

Sets or changes the maximal capacity of the worker pool.

Parameters
capacityThe maximal number of worker objects the worker pool may provide
Returns
True, if succeeded

◆ warning()

static void Ocean::JNI::BaseJni::warning ( const std::string &  message)
static

Java native interface function to forward a warning message to the framework.

Parameters
messageThe warning message to forward

The documentation for this class was generated from the following file: