cae  0.0.0
Cross-API graphics engine
Loading...
Searching...
No Matches
utl Namespace Reference

Classes

class  Clock
 Class for clock. More...
 
struct  Image
 Struct for image. More...
 
interface  IPlugin
 Interface for plugins. More...
 
class  Logger
 Class for logging. More...
 
class  Path
 Class for path resolution utilities. More...
 
class  PluginLoader
 Modern, type-safe plugin loader. More...
 
struct  SharedLib
 RAII wrapper for shared libraries. More...
 

Typedefs

using LibHandle
 
using EntryPointFn = IPlugin *(*)()
 

Enumerations

enum class  PluginType : uint8_t {
  AUDIO = 0 , NETWORK = 1 , RENDERER = 2 , SHADER_IR = 3 ,
  SHADER_FRONTEND = 4 , WINDOW = 5 , UNDEFINED = 255
}
 
enum class  PluginPlatform : uint8_t { LINUX = 0 , MACOSX = 1 , WINDOWS = 2 , ALL = 255 }
 
enum class  LogLevel : uint8_t { INFO , WARNING }
 

Functions

std::unordered_map< std::string, std::string > getEnvMap (const char *const *env)
 Get environment variables as a map.
 
std::vector< char > fileToVector (const std::filesystem::path &path)
 Read a file and return its contents as a vector of chars.
 
std::string fileToString (const std::filesystem::path &path)
 Read a file and return its contents as a string.
 

Typedef Documentation

◆ EntryPointFn

using utl::EntryPointFn = IPlugin *(*)()

Definition at line 79 of file PluginLoader.hpp.

◆ LibHandle

Initial value:
void *

Definition at line 29 of file PluginLoader.hpp.

Enumeration Type Documentation

◆ LogLevel

enum class utl::LogLevel : uint8_t
strong
Enumerator
INFO 
WARNING 

Definition at line 17 of file Logger.hpp.

◆ PluginPlatform

enum class utl::PluginPlatform : uint8_t
strong
Enumerator
LINUX 
MACOSX 
WINDOWS 
ALL 

Definition at line 32 of file IPlugin.hpp.

◆ PluginType

enum class utl::PluginType : uint8_t
strong
Enumerator
AUDIO 
NETWORK 
RENDERER 
SHADER_IR 
SHADER_FRONTEND 
WINDOW 
UNDEFINED 

Definition at line 21 of file IPlugin.hpp.

Function Documentation

◆ fileToString()

std::string utl::fileToString ( const std::filesystem::path & path)
nodiscard

Read a file and return its contents as a string.

Parameters
pathPath to the file
Returns
A string containing the file contents

Definition at line 27 of file file.cpp.

Referenced by cae::Application::start().

+ Here is the caller graph for this function:

◆ fileToVector()

std::vector< char > utl::fileToVector ( const std::filesystem::path & path)
nodiscard

Read a file and return its contents as a vector of chars.

Parameters
pathPath to the file
Returns
A vector of chars containing the file contents

Definition at line 6 of file file.cpp.

◆ getEnvMap()

std::unordered_map< std::string, std::string > utl::getEnvMap ( const char *const * env)
nodiscard

Get environment variables as a map.

Parameters
envPointer to environment variables
Returns
A map of environment variables

Definition at line 9 of file env.cpp.

Referenced by cae::ArgsHandler::ParseEnv().

+ Here is the caller graph for this function: