SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLIOMemory Namespace Reference

Collection of functions for accessing files stored in memory. More...

Functions

bool exists (std::string path)
 
std::vector< char > & get (std::string path)
 
void set (std::string path, const std::vector< char > &data)
 
void clear (std::string path)
 

Detailed Description

Collection of functions for accessing files stored in memory.

Function Documentation

◆ clear()

void SLIOMemory::clear ( std::string  path)

Definition at line 34 of file SLIOMemory.cpp.

35 {
36  memoryFiles.erase(path);
37 }
std::unordered_map< std::string, std::vector< char > > memoryFiles
Definition: SLIOMemory.cpp:17

◆ exists()

bool SLIOMemory::exists ( std::string  path)

Definition at line 19 of file SLIOMemory.cpp.

20 {
21  return memoryFiles.count(path);
22 }

◆ get()

std::vector< char > & SLIOMemory::get ( std::string  path)

Definition at line 24 of file SLIOMemory.cpp.

25 {
26  return memoryFiles[path];
27 }

◆ set()

void SLIOMemory::set ( std::string  path,
const std::vector< char > &  data 
)

Definition at line 29 of file SLIOMemory.cpp.

30 {
31  memoryFiles[path] = data;
32 }