Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Public Member Functions | Private Attributes | List of all members
cqsp::asset::NativeFileSystem Class Reference

#include <nativevfs.h>

Inheritance diagram for cqsp::asset::NativeFileSystem:
cqsp::asset::IVirtualFileSystem

Public Member Functions

 NativeFileSystem (std::string root)
 
 ~NativeFileSystem ()=default
 
bool Initialize () override
 
std::shared_ptr< IVirtualFileOpen (const std::string &path, FileModes) override
 Opens file from the filesystem. Returns nullptr if file is invalid More...
 
void Close (std::shared_ptr< IVirtualFile > &) override
 
std::shared_ptr< IVirtualDirectoryOpenDirectory (const std::string &dir) override
 Lists all the files in the directory. Does not list directories in the list because for our purposes, we do not need to traverse and process directories with this. Returns nullptr if path does not exist or is not a directory. More...
 
bool IsFile (const std::string &path) override
 Is the file a file More...
 
bool IsDirectory (const std::string &path) override
 Is the file a directory </summary More...
 
bool Exists (const std::string &path) override
 Does the file exist More...
 
const std::string & GetRoot ()
 
- Public Member Functions inherited from cqsp::asset::IVirtualFileSystem
 IVirtualFileSystem ()
 
virtual ~IVirtualFileSystem ()
 
virtual void Close (IVirtualFilePtr &)=0
 Closes the file. More...
 

Private Attributes

std::string root
 
friend NativeDirectory
 

Constructor & Destructor Documentation

◆ NativeFileSystem()

cqsp::asset::NativeFileSystem::NativeFileSystem ( std::string  root)
explicit

◆ ~NativeFileSystem()

cqsp::asset::NativeFileSystem::~NativeFileSystem ( )
default

Member Function Documentation

◆ Close()

void cqsp::asset::NativeFileSystem::Close ( std::shared_ptr< IVirtualFile > &  vf)
override

◆ Exists()

bool cqsp::asset::NativeFileSystem::Exists ( const std::string &  path)
overridevirtual

Does the file exist

Implements cqsp::asset::IVirtualFileSystem.

◆ GetRoot()

const std::string & cqsp::asset::NativeFileSystem::GetRoot ( )
inline

◆ Initialize()

bool cqsp::asset::NativeFileSystem::Initialize ( )
inlineoverridevirtual

◆ IsDirectory()

bool cqsp::asset::NativeFileSystem::IsDirectory ( const std::string &  path)
overridevirtual

Is the file a directory </summary

Implements cqsp::asset::IVirtualFileSystem.

◆ IsFile()

bool cqsp::asset::NativeFileSystem::IsFile ( const std::string &  path)
overridevirtual

Is the file a file

Implements cqsp::asset::IVirtualFileSystem.

◆ Open()

std::shared_ptr< cqsp::asset::IVirtualFile > cqsp::asset::NativeFileSystem::Open ( const std::string &  path,
FileModes  modes 
)
overridevirtual

Opens file from the filesystem. Returns nullptr if file is invalid

Implements cqsp::asset::IVirtualFileSystem.

◆ OpenDirectory()

std::shared_ptr< cqsp::asset::IVirtualDirectory > cqsp::asset::NativeFileSystem::OpenDirectory ( const std::string &  path)
overridevirtual

Lists all the files in the directory. Does not list directories in the list because for our purposes, we do not need to traverse and process directories with this. Returns nullptr if path does not exist or is not a directory.

Implements cqsp::asset::IVirtualFileSystem.

Member Data Documentation

◆ NativeDirectory

friend cqsp::asset::NativeFileSystem::NativeDirectory
private

◆ root

std::string cqsp::asset::NativeFileSystem::root
private

The documentation for this class was generated from the following files: