Category : C++ Source Code
Archive   : BCEXAMP.ZIP
Filename : DIRECTRY.H

 
Output of file : DIRECTRY.H contained in archive : BCEXAMP.ZIP
// Borland C++ - (C) Copyright 1991 by Borland International

// Contents ----------------------------------------------------------------
//
// directoryClass
//
// Directory
//
// Description
//
// Defines class Directory.
//
// End ---------------------------------------------------------------------

// Interface Dependencies ---------------------------------------------------

#ifndef __DIRECTRY_H
#define __DIRECTRY_H

#ifndef __DIR_H
#include
#define __DIR_H
#endif

#ifndef __CLSTYPES_H
#include
#endif

#ifndef __SORTARRY_H
#include
#endif

#ifndef __FILEDATA_H
#include "filedata.h"
#endif

// End Interface Dependencies ------------------------------------------------


// Macro //

// Summary -----------------------------------------------------------------
//
// Defines a value for the directory class. We use the next available
// number after the class which sorts files by date.
//
// End ---------------------------------------------------------------------

#define directoryClass (filesBySizeClass+1)


// Class //

class Directory: public SortedArray
{
public:
virtual ~Directory() {}
enum sortOrder { byName, byDate, bySize };
Directory( char *, sortOrder );

virtual classType isA() { return directoryClass; }
virtual char *nameOf() { return "Directory"; }
virtual hashValueType hashValue() { return 0; }

virtual void printHeader( ostream& ) const;
virtual void printSeparator( ostream& ) const;
virtual void printTrailer( ostream& ) const;

private:
void addFile( ffblk&, sortOrder );
String mask;
};

// Description -------------------------------------------------------------
//
// Defines a directory class. Class Directory is derived from the
// class SortedArray, which is part of the class library.
//

// Constructor
//
// Directory
//
// Constructs a directory object from the given name and sorting
// order.
//
// Destructor
//
// ~Directory
//
// Public Members
//
// sortOrder
//
// Enumerated order for sorting directories.
//
// isA
//
// Returns the class type of Directory.
//
// nameOf
//
// Returns a pointer to the character string "Directory."
//
// hashValue
//
// Returns a pre-defined hash value for a directory object.
//
// Private Members
//
// addFile
//
// Adds a file to the directory structure.
//
// End ---------------------------------------------------------------------


#endif // __DIRECTRY_H


  3 Responses to “Category : C++ Source Code
Archive   : BCEXAMP.ZIP
Filename : DIRECTRY.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/