Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

class Geo::GeoFileManager

    └>Geo::GeoSingleton< GeoFileManager >

The file manager deals with locating resources given a path and a filename.

Paths can be relative to the current executable or absolute.

Functions

NameDescription
~GeoSingleton()

Destructor clears singleton pointer.

AddToPath(const char *, bool)

Add a directory to the path.

GeoSingleton()

Constructor initialises singleton pointer.

Get()

Returns a pointer to the singleton instance.

IsAvailable()

Returns true if the singleton is available.

PurgePath()

Empty path of all entries.

RemoveFromPath(const char *)

Removes a directory from the path, if it has already been added.

SearchInPath(const char *, Geo::GeoFileString &)

Try to find a file.

Start()

Setup the singleton instance.

Stop()

Release the singleton instance.

Variables

NameDescription
tClass * m_Singleton = NULL

Pointer to the singleton instance or NULL if not started.


Anchor
a82ee7edacbf148ad1a6036575dc756a2
a82ee7edacbf148ad1a6036575dc756a2

Geo::GeoSingleton< tClass >::~GeoSingleton

...

protected: ~GeoSingleton()

...

Destructor clears singleton pointer.


Anchor
a3b804717fd89e6022c20d328cbb5b6db
a3b804717fd89e6022c20d328cbb5b6db

void Geo::GeoFileManager::AddToPath

...

public: void AddToPath
(
    const char * directory,
    bool searchFirst
)

...

Add a directory to the path.

'searchFirst' specifies whether this directory should be searched before the existing paths, otherwise it will be searched after them.


Anchor
a6336f7cf559d808beac7f44144741ce6
a6336f7cf559d808beac7f44144741ce6

Geo::GeoSingleton< tClass >::GeoSingleton

...

protected: GeoSingleton()

...

Constructor initialises singleton pointer.


Anchor
aabdf9e4e0dd8c2c8e1f1dc3ebe532f11
aabdf9e4e0dd8c2c8e1f1dc3ebe532f11

tClass * Geo::GeoSingleton< tClass >::Get

...

public: tClass * Get()

...

Returns a pointer to the singleton instance.


Anchor
a8544559aa1f9d376753d1aef8baf1de6
a8544559aa1f9d376753d1aef8baf1de6

bool Geo::GeoSingleton< tClass >::IsAvailable

...

public: bool IsAvailable()

...

Returns true if the singleton is available.


Anchor
a0ff9b41bb29d687f2814161bd63c62d3
a0ff9b41bb29d687f2814161bd63c62d3

void Geo::GeoFileManager::PurgePath

...

public: void PurgePath()

...

Empty path of all entries.


Anchor
a44b3446dcda461a5dd0364245a3b10c4
a44b3446dcda461a5dd0364245a3b10c4

bool Geo::GeoFileManager::RemoveFromPath

...

public: bool RemoveFromPath
(
    const char * directory
)

...

Removes a directory from the path, if it has already been added.

Returns true if the directory was found and successfully removed, false otherwise.


Anchor
a72e37e1a3c51fb138c98e52bb17c11d0
a72e37e1a3c51fb138c98e52bb17c11d0

bool Geo::GeoFileManager::SearchInPath

...

public: bool SearchInPath
(
    const char * filename,
    Geo::GeoFileString & destPath
)

...

Try to find a file.

Parameters
[in]filename

The filename to search for.

[out]destPath

Returns the path in destPath.

Returns

True if succeeded, false otherwise.

Note
titleNote

This always searches in the current directory first.


Anchor
a16b72c3f5156496b63c45efc7cf6d211
a16b72c3f5156496b63c45efc7cf6d211

bool Geo::GeoSingleton< tClass >::Start

...

public: bool Start()

...

Setup the singleton instance.


Anchor
acfd9a98496840f08a3c50431cb54f805
acfd9a98496840f08a3c50431cb54f805

void Geo::GeoSingleton< tClass >::Stop

...

public: void Stop()

...

Release the singleton instance.