Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
(NazaraCore) Core module

Classes

class  Nz::Bitset< Block, Allocator >
 Core class that represents a set of bits. More...
 
class  Nz::CallOnExit
 Core class that represents a function to call at the end of the scope. More...
 
class  Nz::Color
 Core class that represents a color. More...
 
class  Nz::Flags< E >
 Core class used to combine enumeration values into flags bitfield. More...
 
class  Nz::FunctorWithoutArgs< F >
 Core class that represents a functor using a function without argument. More...
 
class  Nz::FunctorWithArgs< F, Args >
 Core class that represents a functor using a function with arguments. More...
 
class  Nz::MemberWithoutArgs< C >
 Core class that represents a functor using a member function. More...
 
class  Nz::Initializer< Args >
 Core class that represents a module initializer. More...
 
class  Nz::LockGuard
 Core class that represents a mutex wrapper that provides a convenient RAII-style mechanism. More...
 
class  Nz::StackArray< T >
 Core class that represents a stack-allocated (if alloca is present) array. More...
 
class  Nz::MemoryPool
 Core class that represents a memory pool. More...
 
class  Nz::MemoryStream
 Constructs a MemoryStream object by default. More...
 
class  Nz::MovablePtr< T >
 Wraps a raw (non-proprietary) to allows it to be moved implicitly. More...
 
class  Nz::Mutex
 Core class that represents a binary semaphore, a mutex. More...
 
class  Nz::ObjectHandle< T >
 Core class that represents a object handle. More...
 
class  Nz::ObjectRef< T >
 Core class that represents a reference to an object. More...
 
class  Nz::PrimitiveList
 TODO: Inline this. More...
 
class  Nz::ResourceLoader< Type, Parameters >
 Core class that represents a loader of resources. More...
 
class  Nz::ResourceManager< Type, Parameters >
 Core class that represents a resource manager. More...
 
class  Nz::ResourceSaver< Type, Parameters >
 Core class that represents a list of saver functions for a specific resource type. More...
 
class  Nz::Signal< Args >
 Core class that represents a signal, a list of objects waiting for its message. More...
 
class  Nz::SparsePtr< T >
 Core class that represents a pointer and the step between two elements. More...
 
class  Nz::TaskScheduler
 Core class that represents a thread pool. More...
 
class  Nz::Thread
 Core class that represents a thread. More...
 
class  Nz::AbstractHash
 Core class that represents the behaviour of the hash classes. More...
 
class  Nz::AbstractLogger
 Core class that represents the behaviour of the log classes. More...
 
class  Nz::ByteArray
 Core class that represents an array of bytes. More...
 
class  Nz::ByteStream
 Core class that represents a stream of bytes. More...
 
class  Nz::Clock
 Utility class that measure the elapsed time. More...
 
class  Nz::ConditionVariable
 Core class that represents a condition variable. More...
 
class  Nz::Core
 Core class that represents the module initializer of Core. More...
 
class  Nz::Directory
 Core class that represents a directory. More...
 
class  Nz::DynLib
 Core class that represents a dynamic library loader. More...
 
class  Nz::Error
 Core class that represents an error. More...
 
class  Nz::ErrorFlags
 Core class that represents flags for error. More...
 
class  Nz::File
 Core class that represents a file. More...
 
class  Nz::FileLogger
 Core class that represents a file logger. More...
 
class  Nz::GuillotineBinPack
 Core class that represents the "Guillotine problem", combination of the "Bin packing problem" and the "cutting stock". More...
 
class  Nz::HardwareInfo
 Core class that represents the info we can get from hardware. More...
 
class  Nz::Log
 Core class that represents a logger. More...
 
class  Nz::MemoryManager
 Core class that represents a manager for the memory. More...
 
class  Nz::MemoryView
 Core class that represents a view of the memory behaving like a stream. More...
 
class  Nz::ParameterList
 Core class that represents a list of parameters. More...
 
class  Nz::PluginManager
 Core class that represents a manager for plugin. More...
 
class  Nz::RefCounted
 Core class that represents a reference with a counter. More...
 
class  Nz::Resource
 Core class that represents a resource. More...
 
class  Nz::Semaphore
 Core class that represents a counting semaphore. More...
 
class  Nz::SerializationContext
 Structure containing a serialization/unserialization context states. More...
 
class  Nz::StdLogger
 Core class that represents a logger writing to standard output (stdout, stderr) More...
 
class  Nz::Stream
 Core class that represents a stream. More...
 
class  Nz::String
 Core class that represents a string. More...
 
class  Nz::StringStream
 Core class that represents a stream of strings. More...
 
class  Nz::Unicode
 Core class that represents a Unicode character. More...
 

Functions

template<typename F , typename Tuple >
decltype(auto) Nz::Apply (F &&fn, Tuple &&t)
 Applies the tuple to the function (e.g. calls the function using the tuple content as arguments) More...
 
template<typename O , typename F , typename Tuple >
decltype(auto) Nz::Apply (O &object, F &&fn, Tuple &&t)
 Applies the tuple to the member function on an object (e.g. calls the member function using the tuple content as arguments) More...
 
template<typename T >
constexpr std::size_t Nz::BitCount ()
 Returns the number of bits occupied by the type T. More...
 
template<typename T >
ByteArray Nz::ComputeHash (HashType hash, const T &v)
 Computes the hash of a hashable object. More...
 
template<typename T >
ByteArray Nz::ComputeHash (AbstractHash *hash, const T &v)
 Computes the hash of a hashable object. More...
 
template<typename T , std::size_t N>
constexpr std::size_t Nz::CountOf (T(&)[N]) noexcept
 Returns the number of elements in a C-array. More...
 
template<typename T >
std::size_t Nz::CountOf (const T &c)
 Returns the number of elements in a container. More...
 
template<typename T >
void Nz::HashCombine (std::size_t &seed, const T &v)
 Combines two hash in one. More...
 
template<typename T >
Nz::ReverseBits (T integer)
 Reverse the bit order of the integer. More...
 
bool Nz::Serialize (SerializationContext &context, bool value)
 Serializes a boolean. More...
 
bool Nz::Serialize (SerializationContext &context, const std::string &value)
 Serializes a std::string. More...
 
template<typename T >
std::enable_if_t< std::is_arithmetic< T >::value, bool > Nz::Serialize (SerializationContext &context, T value)
 Serializes an arithmetic type. More...
 
bool Nz::Unserialize (SerializationContext &context, bool *value)
 Unserializes a boolean. More...
 
template<typename T >
std::enable_if_t< std::is_arithmetic< T >::value, bool > Nz::Unserialize (SerializationContext &context, T *value)
 Unserializes an arithmetic type. More...
 
constexpr Endianness Nz::GetPlatformEndianness ()
 Gets the platform endianness. More...
 
void Nz::SwapBytes (void *buffer, std::size_t size)
 Swaps the byte for endianness operations. More...
 
 Nz::Stream::Stream (StreamOptionFlags streamOptions=StreamOption_None, OpenModeFlags openMode=OpenMode_NotOpen)
 Constructs a Stream object with options. More...
 

Detailed Description

Core/System module including classes to handle threading, time, hardware info, memory management, etc...

Function Documentation

◆ Apply() [1/2]

template<typename F , typename Tuple >
decltype(auto) Nz::Apply ( F &&  fn,
Tuple &&  t 
)

Applies the tuple to the function (e.g. calls the function using the tuple content as arguments)

Returns
The result of the function
Parameters
fnFunction
tTuple of arguments for the function
See also
Apply

◆ Apply() [2/2]

template<typename O , typename F , typename Tuple >
decltype(auto) Nz::Apply ( O &  object,
F &&  fn,
Tuple &&  t 
)

Applies the tuple to the member function on an object (e.g. calls the member function using the tuple content as arguments)

Returns
The result of the member function called
Parameters
objectObject of a class
fnMember function
tTuple of arguments for the member function
See also
Apply

◆ BitCount()

template<typename T >
constexpr std::size_t Nz::BitCount ( )

Returns the number of bits occupied by the type T.

Returns
Number of bits occupied by the type

◆ ComputeHash() [1/2]

template<typename T >
ByteArray Nz::ComputeHash ( HashType  hash,
const T &  v 
)

Computes the hash of a hashable object.

Returns
A bytearray which represents the hash
Parameters
hashEnumeration of type HashType
vObject to hash
Remarks
a HashAppend specialization for type T is required
See also
ComputeHash

◆ ComputeHash() [2/2]

template<typename T >
ByteArray Nz::ComputeHash ( AbstractHash hash,
const T &  v 
)

Computes the hash of a hashable object.

Returns
A bytearray which represents the hash
Parameters
hashPointer to abstract hash
vObject to hash
Remarks
Produce a NazaraAssert if pointer to Abstracthash is invalid
a HashAppend specialization for type T is required
See also
ComputeHash

◆ CountOf() [1/2]

template<typename T , std::size_t N>
constexpr std::size_t Nz::CountOf ( T(&)  [N])
noexcept

Returns the number of elements in a C-array.

Returns
The number of elements
Parameters
nameC-array
See also
CountOf

◆ CountOf() [2/2]

template<typename T >
std::size_t Nz::CountOf ( const T &  c)

Returns the number of elements in a container.

Returns
The number of elements
Parameters
cContainer with the member function "size()"
See also
CountOf

◆ GetPlatformEndianness()

constexpr Endianness Nz::GetPlatformEndianness ( )
inline

Gets the platform endianness.

Returns
Type of the endianness

◆ HashCombine()

template<typename T >
void Nz::HashCombine ( std::size_t &  seed,
const T &  v 
)

Combines two hash in one.

Parameters
seedFirst value that will be modified (expected to be 64bits)
vSecond value to hash

◆ ReverseBits()

template<typename T >
T Nz::ReverseBits ( integer)

Reverse the bit order of the integer.

Returns
integer with reversed bits
Parameters
integerInteger whose bits are to be reversed

◆ Serialize() [1/3]

bool Nz::Serialize ( SerializationContext context,
bool  value 
)
inline

Serializes a boolean.

Returns
true if serialization succeeded
Parameters
contextContext for the serialization
valueBoolean to serialize
See also
Serialize, Unserialize

◆ Serialize() [2/3]

bool Nz::Serialize ( SerializationContext context,
const std::string &  value 
)
inline

Serializes a std::string.

Returns
true if successful
Parameters
contextContext for the serialization
valueString to serialize

◆ Serialize() [3/3]

template<typename T >
std::enable_if_t< std::is_arithmetic< T >::value, bool > Nz::Serialize ( SerializationContext context,
value 
)

Serializes an arithmetic type.

Returns
true if serialization succeeded
Parameters
contextContext for the serialization
valueArithmetic type to serialize
See also
Serialize, Unserialize

◆ Stream()

Nz::Stream::Stream ( StreamOptionFlags  streamOptions = StreamOption_None,
OpenModeFlags  openMode = OpenMode_NotOpen 
)
inlineprotected

Constructs a Stream object with options.

Parameters
streamOptionsOptions for the stream
openModeReading/writing mode for the stream

◆ SwapBytes()

void Nz::SwapBytes ( void *  buffer,
std::size_t  size 
)
inline

Swaps the byte for endianness operations.

Parameters
bufferRaw memory
sizeSize to change endianness
Remarks
If size is greater than the preallocated buffer, the behavior is undefined

◆ Unserialize() [1/2]

bool Nz::Unserialize ( SerializationContext context,
bool *  value 
)
inline

Unserializes a boolean.

Returns
true if unserialization succedeed
Parameters
contextContext for the unserialization
valuePointer to boolean to unserialize
See also
Serialize, Unserialize

◆ Unserialize() [2/2]

template<typename T >
std::enable_if_t< std::is_arithmetic< T >::value, bool > Nz::Unserialize ( SerializationContext context,
T *  value 
)

Unserializes an arithmetic type.

Returns
true if unserialization succedeed
Parameters
contextContext for the unserialization
valuePointer to arithmetic type to serialize
Remarks
Produce a NazaraAssert if pointer to value is invalid
See also
Serialize, Unserialize