Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::io Namespace Reference

Input/Output abstractions (Filesystem, Network, ...). More...

Classes

class  File
class  FileSystem
 Virtual file system wrapper. More...
class  LoggerStream
 Add stream capabilities logs, letting you do calls like oe::log << any_variable. More...
class  Logger
 Log messages. More...
class  LogHandler
 Handles log messages. More...
class  DefaultLogHandler
 Default log handler. More...
class  Stream

Typedefs

typedef uint64_t LogVerbosity
 Log verbosity serves as a filter below the LogLevel.

Enumerations

enum  FileMode { READ = 1 , WRITE = 2 , APPEND = 4 }
enum class  FileSystemError {
  NO_ERROR , OTHER_ERROR , OUT_OF_MEMORY , NOT_INITIALIZED ,
  IS_INITIALIZED , ARGV0_IS_NULL , UNSUPPORTED , PAST_EOF ,
  FILES_STILL_OPEN , INVALID_ARGUMENT , NOT_MOUNTED , NOT_FOUND ,
  SYMLINK_FORBIDDEN , NO_WRITE_DIR , OPEN_FOR_READING , OPEN_FOR_WRITING ,
  NOT_A_FILE , READ_ONLY , CORRUPT , SYMLINK_LOOP ,
  IO , PERMISSION , NO_SPACE_LEFT , BAD_FILENAME ,
  BUSY , DIR_NOT_EMPTY , OS_ERROR , DUPLICATE ,
  BAD_PASSWORD , APP_CALLBACK
}
 FileSystem error. More...
enum class  LogLevel {
  LEVEL_TRACE , LEVEL_DEBUG , LEVEL_INFO , LEVEL_WARNING ,
  LEVEL_ERROR , LEVEL_CRITICAL
}
 Severity of the log. More...

Variables

constexpr LogLevel default_log_level = LogLevel::LEVEL_INFO
 Default log level when no level is supplied to log functions.
constexpr uint64_t default_log_verbosity = 0xFFFFFFFF
 Default log verbosity.

Detailed Description

Input/Output abstractions (Filesystem, Network, ...).

Typedef Documentation

◆ LogVerbosity

typedef uint64_t oe::io::LogVerbosity

Log verbosity serves as a filter below the LogLevel.

Here you are free to use any values you want, it will be sent as-is to LogHandler::canWrite

Enumeration Type Documentation

◆ FileSystemError

enum class oe::io::FileSystemError
strong

FileSystem error.

Enumerator
NO_ERROR 

Success; no error.

OTHER_ERROR 

Error not otherwise covered here.

OUT_OF_MEMORY 

Memory allocation failed.

NOT_INITIALIZED 

FileSystem is not initialized.

IS_INITIALIZED 

FileSystem is already initialized.

ARGV0_IS_NULL 

Needed argv[0], but it is NULL.

UNSUPPORTED 

Operation or feature unsupported.

PAST_EOF 

Attempted to access past end of file.

FILES_STILL_OPEN 

Files still open.

INVALID_ARGUMENT 

Bad parameter passed to an function.

NOT_MOUNTED 

Requested archive/dir not mounted.

NOT_FOUND 

File (or whatever) not found.

SYMLINK_FORBIDDEN 

Symlink seen when not permitted.

NO_WRITE_DIR 

No write dir has been specified.

OPEN_FOR_READING 

Wrote to a file opened for reading.

OPEN_FOR_WRITING 

Read from a file opened for writing.

NOT_A_FILE 

Needed a file, got a directory (etc).

READ_ONLY 

Wrote to a read-only filesystem.

CORRUPT 

Corrupted data encountered.

SYMLINK_LOOP 

Infinite symbolic link loop.

IO 

i/o error (hardware failure, etc).

PERMISSION 

Permission denied.

NO_SPACE_LEFT 

No space (disk full, over quota, etc)

BAD_FILENAME 

Filename is bogus/insecure.

BUSY 

Tried to modify a file the OS needs.

DIR_NOT_EMPTY 

Tried to delete dir with files in it.

OS_ERROR 

Unspecified OS-level error.

DUPLICATE 

Duplicate entry.

BAD_PASSWORD 

Bad password.

APP_CALLBACK 

Application callback reported error.

◆ LogLevel

enum class oe::io::LogLevel
strong

Severity of the log.

Enumerator
LEVEL_TRACE 

Precise log, for example functions/variables values

LEVEL_DEBUG 

Message aimed at debugging the application

LEVEL_INFO 

Various informations, standard log

LEVEL_WARNING 

There might (or might not) have a problem

LEVEL_ERROR 

Something is not working

LEVEL_CRITICAL 

Overall critical failure

Variable Documentation

◆ default_log_level

LogLevel oe::io::default_log_level = LogLevel::LEVEL_INFO
constexpr

Default log level when no level is supplied to log functions.

For example, when you use oe::log.info() << any_variable