Design Pattern Examples
Overview of object-oriented design patterns
cplusplus/Composite_FileAccess.h
Go to the documentation of this file.
1
5
6
#pragma once
7
#ifndef __COMPOSITE_FILEACCESS_H__
8
#define __COMPOSITE_FILEACCESS_H__
9
10
#include <memory>
11
#include "
Composite_FileDirEntry.h
"
12
13
namespace
DesignPatternExamples_cpp
14
{
15
20
// Using a class here instead of a namespace because Doxygen seems to have
21
// trouble with nested namespaces.
22
class
Composite_FileAccess
23
{
24
private
:
29
static
std::shared_ptr<FileDirEntry>
rootEntry
;
30
38
static
FileDirEntry
*
_FindEntry
(std::string filepath);
39
40
public
:
51
static
FileDirEntry
*
GetEntry
(std::string filepath);
52
};
53
}
// end namespace
54
55
#endif
// __COMPOSITE_FILEACCESS_H__
56
DesignPatternExamples_cpp::Composite_FileAccess
Class containing static functions for accessing a hardcoded "file" and "directory" hierarchy.
Definition:
cplusplus/Composite_FileAccess.h:23
DesignPatternExamples_cpp::Composite_FileAccess::_FindEntry
static FileDirEntry * _FindEntry(std::string filepath)
Helper method to search the static data list for the specified file/dir entry.
Definition:
Composite_FileAccess.cpp:39
DesignPatternExamples_cpp::Composite_FileAccess::rootEntry
static std::shared_ptr< FileDirEntry > rootEntry
List of all "files" and "directories" used in the Command Pattern example.
Definition:
cplusplus/Composite_FileAccess.h:29
DesignPatternExamples_cpp::Composite_FileAccess::GetEntry
static FileDirEntry * GetEntry(std::string filepath)
Return a FileDirEntry object representing the specified file "path" in an internal list of data entri...
Definition:
Composite_FileAccess.cpp:93
DesignPatternExamples_cpp::FileDirEntry
Base class representing a File or Directory entry.
Definition:
cplusplus/Composite_FileDirEntry.h:48
Composite_FileDirEntry.h
Implementation of the FileDirEntry, FileEntry, and DirEntry classes used in the Composite Pattern.
DesignPatternExamples_cpp
The namespace containing all Design Pattern Examples implemented in C++.
Definition:
Adapter_Exercise.cpp:13
cplusplus
Composite_FileAccess.h
Generated on Tue Aug 29 2023 19:47:44 for Design Pattern Examples by
1.9.6