Design Pattern Examples
Overview of object-oriented design patterns
DirEntry Struct Reference

Represents a Directory entry. More...

#include <Composite_FileDirEntry.h>

Collaboration diagram for DirEntry:
Collaboration graph

Public Attributes

FileDirEntry base
 Base FileDirEntry identifying this entry.
 
FileDirEntry_children
 Linked list of possible children. NULL if empty.
 
bool _lengthSet
 

Detailed Description

Represents a Directory entry.

A directory entry contains 0 or more children, which can be a mix of file and directory entries.

A Directory's size is the sum of all children sizes and is computed once on the first call to the FileDirEntry_GetLength() function.

Definition at line 98 of file c/Composite_FileDirEntry.h.

Member Data Documentation

◆ _children

FileDirEntry* _children

Linked list of possible children. NULL if empty.

Definition at line 101 of file c/Composite_FileDirEntry.h.

Referenced by _AddChild(), _DestroyTree(), Children(), FileDirEntry_GetChildren(), FileDirEntry_GetLength(), and Length().

◆ _lengthSet

bool _lengthSet

true if length of all children has been computed; otherwise, false.

Definition at line 102 of file c/Composite_FileDirEntry.h.

Referenced by FileDirEntry_GetLength(), and Length().

◆ base

Base FileDirEntry identifying this entry.

Definition at line 100 of file c/Composite_FileDirEntry.h.

Referenced by _NewDirEntry(), and FileDirEntry_GetLength().


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