inkcpp
Loading...
Searching...
No Matches
ink Namespace Reference

Namespace contaning all modules and classes from InkCPP. More...

Namespaces

namespace  compiler
 collection of functions to compile a story.json to story.bin
namespace  config
 set limitations which are required to minimize heap allocations.
namespace  runtime
 Contaning all modules and classes used for the inkles ink runtime.

Classes

struct  list_flag
 Used to unique identify a list flag.

Typedefs

typedef unsigned int uint32_t
 define basic numeric type
typedef uint32_t hash_t
 Name hash (used for temporary variables).
typedef unsigned char byte_t
 Byte type.
typedef decltype(static_cast< int * >(nullptr) - static_cast< int * >(nullptr)) ptrdiff_t
 Ptr difference type.
typedef uint32_t offset_t
 Verify sizes.
typedef const unsigned char * ip_t
 Instruction pointer used for addressing within the story instructions.
typedef unsigned int size_t
 Used for the size of arrays.
typedef uint32_t container_t
 Used as the unique identifier for an ink container.
typedef uint32_t thread_t
 Used to uniquely identify threads.
using ink_exception = std::runtime_error
 exception type thrown if something goes wrong
template<typename T>
using optional = std::optional<T>
 custom optional implementation for usage if STL is disabled

Functions

hash_t hash_string (const char *string)
 Simple hash for serialization of strings.
hash_t hash_data (const unsigned char *data, size_t len)
 Simple hash for detcting changes in binary data.
template<typename... Args>
void ink_assert (bool condition, const char *msg=nullptr, Args... args)
 Assert helper, not to be used directly, please use inkAssert and inkFail to be enviroment agnostic.
template<typename... Args>
void ink_assert (const char *msg=nullptr, Args... args)
 Assert helper, not to be used directly, please use inkAssert and inkFail to be enviroment agnostic.

Variables

const hash_t InvalidHash = 0
 Invalid hash value.
constexpr list_flag null_flag {-1, -1}
 value of an unset list_flag
constexpr list_flag empty_flag {-1, 0}
 value representing an empty list
constexpr std::nullopt_t nullopt = std::nullopt
 an empty optional
constexpr uint32_t InkBinVersion = 2
 Supportet version of ink.bin files.
constexpr uint32_t InkVersion = 21
 Supported version of ink.json files.

Detailed Description

Namespace contaning all modules and classes from InkCPP.

(Unreal Blueprint Classes Excluded, but there will not be there in a normal build)

Typedef Documentation

◆ offset_t

Verify sizes.

Used to identify an offset in a data table (like a string in the string table)

◆ optional

template<typename T>
using ink::optional = std::optional<T>

custom optional implementation for usage if STL is disabled

Template Parameters
Ttype contaied in optional

◆ uint32_t

typedef unsigned int ink::uint32_t

define basic numeric type

Todo
use a less missleading name

Function Documentation

◆ hash_data()

hash_t ink::hash_data ( const unsigned char * data,
size_t len )
inline

Simple hash for detcting changes in binary data.

(e.g. Changes in the story file)