Provides basic primitives: book, buffer, streams.
Book
is an allocation helper, providing a way of management of long-living objects, alternative to RAII or smart pointers. The idea is that objects are to be allocated in a book, and then handled by simple reference (or pointer). When they are not needed anymore, book can be freed and then reused as necessary. Objects cannot be freed individually, as with smart pointers.
class Object { ... };
Book book;
Object& object = book.Allocate<Object>(objectArg1, objectArg2, ...);
...
book.Free(); // destructor also frees the book
// book is empty now
Provides UTF-8, UTF-16, UTF-32 iterators and conversion.
Basic utilities missing from standard library, mostly templates.
Abstracts defining executable entry point on various platforms. Link coil_core_entrypoint_console
or coil_core_entrypoint_graphical
to the executable depending on whether it's console or graphical application.
#include <coil/entrypoint.hpp>
int COIL_ENTRY_POINT(std::vector<std::string>&& args)
{
return 0;
}
Defines application identity globals, which are then used by various libraries (for example, to represent application in system's volume mixer).
#include <coil/appidentity.hpp>
...
auto& appIdentity = AppIdentity::GetInstance();
appIdentity.Name() = "My Application";
appIdentity.Version() = 12345678;
File system primitives: files, file streams, file memory mapping.
For simplicity represents file paths with std::string
, always in UTF-8 encoding. Platform's native path separator is used.
Asyncronous, parallel, coroutine-based tasks.