Leviathan  0.8.0.0
Leviathan game engine
Leviathan::FileDefinitionType Struct Reference

#include <FileSystem.h>

Public Member Functions

 FileDefinitionType (FileSystem *instance, const std::string &path)
 
 ~FileDefinitionType ()
 
std::string GetNameWithExtension () const
 
bool operator< (const FileDefinitionType &other) const
 

Public Attributes

std::string RelativePath
 
std::string Name
 
int ExtensionID
 

Detailed Description

Definition at line 43 of file FileSystem.h.

Constructor & Destructor Documentation

◆ FileDefinitionType()

Leviathan::FileDefinitionType::FileDefinitionType ( FileSystem instance,
const std::string &  path 
)

Definition at line 898 of file FileSystem.cpp.

898  :
899  RelativePath(path)
900 {
901  // get extension //
902  string tempexpt = StringOperations::GetExtension<std::string>(path);
903 
904  // register extension and store id //
905  ExtensionID = instance->RegisterExtension(tempexpt);
906 
907  // save name //
908  Name = StringOperations::RemoveExtension<std::string>(path, true);
909 }
DLLEXPORT int RegisterExtension(const std::string &extension)
Reserves a number for an extension string.
Definition: FileSystem.cpp:618

◆ ~FileDefinitionType()

Leviathan::FileDefinitionType::~FileDefinitionType ( )

Definition at line 916 of file FileSystem.cpp.

916 {}

Member Function Documentation

◆ GetNameWithExtension()

std::string Leviathan::FileDefinitionType::GetNameWithExtension ( ) const
Returns
The name in this format: "file.extension"

Definition at line 918 of file FileSystem.cpp.

919 {
920  // Add the extension text to the end of the name //
922 }
static DLLEXPORT FileSystem * Get()
Definition: FileSystem.cpp:74
DLLEXPORT const std::string & GetExtensionName(int id) const
Retrieves the name of the extension from the id.
Definition: FileSystem.cpp:649

◆ operator<()

bool Leviathan::FileDefinitionType::operator< ( const FileDefinitionType other) const

Definition at line 911 of file FileSystem.cpp.

912 {
913  return this->Name < other.Name;
914 }

Member Data Documentation

◆ ExtensionID

int Leviathan::FileDefinitionType::ExtensionID

Definition at line 56 of file FileSystem.h.

◆ Name

std::string Leviathan::FileDefinitionType::Name

Definition at line 55 of file FileSystem.h.

◆ RelativePath

std::string Leviathan::FileDefinitionType::RelativePath

Definition at line 54 of file FileSystem.h.


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