Design Pattern Examples
Overview of object-oriented design patterns
FileEntry Class Reference

Represents a File entry. More...

#include <Composite_FileDirEntry.h>

Inheritance diagram for FileEntry:
Inheritance graph
Collaboration diagram for FileEntry:
Collaboration graph

Public Member Functions

 FileEntry (std::string entryName, long size, DateTime modDate)
 Constructor.
 
- Public Member Functions inherited from FileDirEntry
 FileDirEntry ()
 Default constructor.
 
 FileDirEntry (FileDirTypes type, std::string entryName, long size, DateTime modDate)
 Constructor.
 
virtual FileDirTypes FileDirType ()
 The type of this entry as represented by a value from the FileDirTypes enumeration.
 
virtual std::string Name ()
 The name of this entry.
 
virtual long Length ()
 The length in bytes of this entry. Directory entries are the sum of the length of all children.
 
virtual DateTime WhenModified ()
 When this entry was last modified.
 
virtual FileDirEntryList Children ()
 The children of this entry. Is empty if the entry can never have any children (that is, it isn't a container of other entries).
 

Additional Inherited Members

- Protected Attributes inherited from FileDirEntry
FileDirTypes fileDirType
 
std::string name
 
long length
 
DateTime whenModified
 

Detailed Description

Represents a File entry.

A File entry cannot have any children but does have an explicit size.

Definition at line 119 of file cplusplus/Composite_FileDirEntry.h.

Constructor & Destructor Documentation

◆ FileEntry()

FileEntry ( std::string  entryName,
long  size,
DateTime  modDate 
)
inline

Constructor.

Parameters
entryNameName of the entry.
sizeSize of the entry. Can be 0 for directories.
modDateDateTime object indicating when this entry was last modified.

Definition at line 129 of file cplusplus/Composite_FileDirEntry.h.


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