Class containing static functions for accessing a hardcoded "file" and "directory" hierarchy. More...
#include <Composite_FileAccess.h>
Static Public Member Functions | |
static FileDirEntry * | GetEntry (std::string filepath) |
Return a FileDirEntry object representing the specified file "path" in an internal list of data entries that is organized in a file/ directory structure. | |
Static Private Member Functions | |
static FileDirEntry * | _FindEntry (std::string filepath) |
Helper method to search the static data list for the specified file/dir entry. | |
Static Private Attributes | |
static std::shared_ptr< FileDirEntry > | rootEntry |
List of all "files" and "directories" used in the Command Pattern example. | |
Class containing static functions for accessing a hardcoded "file" and "directory" hierarchy.
Definition at line 22 of file cplusplus/Composite_FileAccess.h.
|
staticprivate |
Helper method to search the static data list for the specified file/dir entry.
filepath | A "path" specifying the entry to find, with each component separated by '/'. |
Definition at line 39 of file Composite_FileAccess.cpp.
References FileDirEntry::Children(), FileDirEntry::Name(), Composite_FileAccess::rootEntry, and Helpers::split().
Referenced by Composite_FileAccess::GetEntry().
|
static |
Return a FileDirEntry object representing the specified file "path" in an internal list of data entries that is organized in a file/ directory structure.
filepath | A "path" specifying the entry to find, with each component separated by '/'. |
FIleNotFoundException | The specified file entry was not found. |
Definition at line 93 of file Composite_FileAccess.cpp.
References Composite_FileAccess::_FindEntry(), Helpers::formatstring(), and Helpers::Replace().
Referenced by DesignPatternExamples_cpp::Composite_Exercise().
|
staticprivate |
List of all "files" and "directories" used in the Command Pattern example.
Definition at line 29 of file cplusplus/Composite_FileAccess.h.
Referenced by Composite_FileAccess::_FindEntry().