beastapi/beastmanager.h File Reference

#include "beastapitypes.h"

File Description

The beast manager is the core object for all interaction with the Beast API.

Macros

#define ILB_BEAST_INTERFACE_VERSION   5
 

Enumerations

enum  ILBCacheScope { ILB_CS_GLOBAL, ILB_CS_LOCAL }
 
enum  ILBLogSink {
  ILB_LS_NULL, ILB_LS_STDOUT, ILB_LS_STDERR, ILB_LS_FILE,
  ILB_LS_DEBUG_OUTPUT
}
 
enum  ILBLogType { ILB_LT_ERROR, ILB_LT_INFO }
 

Functions

ILBStatus ILBClearCache (ILBManagerHandle beastManager)
 
static ILBStatus ILBCreateManager (ILBConstString cacheDirectory, ILBCacheScope cacheScope, ILBConstString licenseKey, ILBManagerHandle *beastManager)
 
ILBStatus ILBDestroyManager (ILBManagerHandle beastManager)
 
ILBStatus ILBSetBeastPath (ILBManagerHandle beastManager, ILBConstString beastPath)
 
static ILBStatus ILBSetLogTarget (ILBLogType type, ILBLogSink sink, ILBConstString filename)
 
ILBStatus ILBSetLogTargetFileHandle (ILBLogType type, ILBFileHandle handle)
 
ILBStatus ILBSetStringEncodingImp (ILBStringEncoding encoding)
 

Macro Definition Documentation

#define ILB_BEAST_INTERFACE_VERSION   5

Revision number for released headers.

Will increase with every public release with interface changes

Enumeration Type Documentation

Sets the scope for the cache.

Enumerator
ILB_CS_GLOBAL 

Makes the cache global.

A different new beast manager using the same cache directory will be able to find cached resources

ILB_CS_LOCAL 

Makes the cache local.

A different new beast manager using the same cache directory will not be able to find cached resources

enum ILBLogSink

Enum selecting where to route messages.

Enumerator
ILB_LS_NULL 

Discards messages.

ILB_LS_STDOUT 

Routes messages to stdout.

ILB_LS_STDERR 

Routes messages to stderr.

ILB_LS_FILE 

Routes messages to a user specified file.

ILB_LS_DEBUG_OUTPUT 

Routes messages to the debug output in visual studio when a debugger is connected.

enum ILBLogType

Enum selecting a certain log target.

Enumerator
ILB_LT_ERROR 

Error messages.

ILB_LT_INFO 

Information messages and render progress messages.

Function Documentation

static ILBStatus ILBCreateManager ( ILBConstString  cacheDirectory,
ILBCacheScope  cacheScope,
ILBConstString  licenseKey,
ILBManagerHandle beastManager 
)
inlinestatic

Creates a Beast Manager.

Parameters
cacheDirectorysets the directory where the Beast Manager stores cached and temporary files.
cacheScopesets whether the cache is local to this beast manager or it can be reopened by another Beast Manager in the same directory.
licenseKeythe license key provided to you as part of your evaluation/purchase.
beastManagera pointer to a Beast manager object that will receive the newly allocated handle
Returns
The result of the operation.
+ Examples:
ILBStatus ILBDestroyManager ( ILBManagerHandle  beastManager)

Destroys a Beast Manager
Will invalidate all resources and handles associated it as well.

Parameters
beastManagerthe Beast Manager to destroy
Returns
The result of the operation.
ILBStatus ILBSetBeastPath ( ILBManagerHandle  beastManager,
ILBConstString  beastPath 
)

Sets where the Beast binaries are located.

The default search order is:

  1. The bin directory of where the environment variable BEAST_ROOT points. I.E. BEAST_ROOT\bin.
  2. The directory the beast dll is located in. When calling this, all other search paths are disregarded.
    Parameters
    beastManagerthe BeastManager to set the root
    beastPaththe path to the Beast binaries
    Returns
    ILB_ST_SUCCESS if everything went ok. ILB_ST_FILE_IO_ERROR if the specified directory doesn't contain a valid set of Beast binaries.
+ Examples:
static ILBStatus ILBSetLogTarget ( ILBLogType  type,
ILBLogSink  sink,
ILBConstString  filename 
)
inlinestatic

Sets where log messages should be routed.

Note this function is global rather than connected since some log messages happens before a beast manager may be present or known. Note, this method is not thread safe! Don't call it while other threads are using Beast

Parameters
typethe message type to route to this target
sinkwhere to route the messages
filenamethe file to write the log info to. Only used if sink is ILB_LS_FILE
Returns
ILB_ST_SUCCESS if routing was successful.
+ Examples:
ILBStatus ILBSetLogTargetFileHandle ( ILBLogType  type,
ILBFileHandle  handle 
)

Sets where log messages should be routed.

Note this function is global rather than connected since some log messages happens before a beast manager may be present or known. Note, this method is not thread safe! Don't call it while other threads are using Beast

Parameters
typethe message type to route to this target
handlewhere to route the messages, or ILB_INVALID_FILE_HANDLE to disable logging
Returns
ILB_ST_SUCCESS if routing was successful.
ILBStatus ILBSetStringEncodingImp ( ILBStringEncoding  encoding)

Sets the character type for Beast.

Should generally not be called explicitly but automatically called from ILBCreateManager or ILBSetLogTarget.

Parameters
encodingthe encoding for input and output strings.
Returns
The result of the operation.

Go to the source code of this file.