My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
DirEntry Class Reference

#include <filedef.h>

Inheritance diagram for DirEntry:
Directory

Public Types

enum  EntryKind { Dir, File }
 

Public Member Functions

 DirEntry (DirEntry *parent, FileDef *fd)
 
 DirEntry (DirEntry *parent, QCString name)
 
virtual ~DirEntry ()
 
EntryKind kind () const
 
FileDeffile () const
 
bool isLast () const
 
void setLast (bool b)
 
DirEntryparent () const
 
QCString name () const
 
QCString path () const
 

Protected Attributes

DirEntrym_parent
 
QCString m_name
 

Private Attributes

EntryKind m_kind
 
FileDefm_fd
 
bool m_isLast
 

Detailed Description

Class representing an entry (file or sub directory) in a directory

Definition at line 277 of file filedef.h.

Member Enumeration Documentation

Enumerator
Dir 
File 

Definition at line 280 of file filedef.h.

{ Dir, File };

Constructor & Destructor Documentation

DirEntry::DirEntry ( DirEntry parent,
FileDef fd 
)
inline

Definition at line 281 of file filedef.h.

: m_parent(parent), m_name(fd->name()), m_kind(File), m_fd(fd),
m_isLast(FALSE) { }
DirEntry::DirEntry ( DirEntry parent,
QCString  name 
)
inline

Definition at line 284 of file filedef.h.

: m_parent(parent), m_name(name), m_kind(Dir),
m_fd(0), m_isLast(FALSE) { }
virtual DirEntry::~DirEntry ( )
inlinevirtual

Definition at line 287 of file filedef.h.

{ }

Member Function Documentation

FileDef* DirEntry::file ( ) const
inline

Definition at line 289 of file filedef.h.

References m_fd.

{ return m_fd; }
bool DirEntry::isLast ( ) const
inline

Definition at line 290 of file filedef.h.

References m_isLast.

{ return m_isLast; }
EntryKind DirEntry::kind ( ) const
inline

Definition at line 288 of file filedef.h.

References m_kind.

Referenced by addDirsAsGroups().

{ return m_kind; }
QCString DirEntry::name ( ) const
inline

Definition at line 293 of file filedef.h.

References m_name.

Referenced by addDirsAsGroups(), findDirNode(), path(), and Directory::rename().

{ return m_name; }
DirEntry* DirEntry::parent ( ) const
inline

Definition at line 292 of file filedef.h.

References m_parent.

Referenced by path(), and Directory::reParent().

{ return m_parent; }
QCString DirEntry::path ( ) const
inline

Definition at line 294 of file filedef.h.

References name(), parent(), and path().

Referenced by addDirsAsGroups(), and path().

{ return parent() ? parent()->path()+"/"+name() : name(); }
void DirEntry::setLast ( bool  b)
inline

Definition at line 291 of file filedef.h.

References m_isLast.

Referenced by Directory::addChild(), findDirNode(), and generateFileTree().

{ m_isLast=b; }

Member Data Documentation

FileDef* DirEntry::m_fd
private

Definition at line 302 of file filedef.h.

Referenced by file().

bool DirEntry::m_isLast
private

Definition at line 303 of file filedef.h.

Referenced by isLast(), and setLast().

EntryKind DirEntry::m_kind
private

Definition at line 301 of file filedef.h.

Referenced by kind().

QCString DirEntry::m_name
protected

Definition at line 298 of file filedef.h.

Referenced by name(), and Directory::rename().

DirEntry* DirEntry::m_parent
protected

Definition at line 297 of file filedef.h.

Referenced by parent(), and Directory::reParent().


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