Category : C++ Source Code
Archive   : CHARTP10.ZIP
Filename : TREE.H

 
Output of file : TREE.H contained in archive : CHARTP10.ZIP

// Copyright 1992, David Perelman-Hall & Jamshid Afshar

#ifndef TREE_H
#define TREE_H

#include "category.h"

class Tree;
typedef Tree *Tptr;
const int MAX_CHILDREN = 5;

class Tree {
friend ostream& operator << ( ostream& os, const Tree& tree );
private:
Category _cat;
Tptr _children[MAX_CHILDREN];
int _num_children;
public:
//constructor
Tree( const Category& cat );

//coppy constructor
Tree( const Tree &tree );

//operator =
void operator = ( const Tree &tree );

bool isvalid() const;

//operator ==
bool operator == ( const Tree &tree ) const;

//operator !=
bool operator != ( const Tree &tree ) const{
return !(*this == tree);
}

//return category
const Category& cat() const {
return _cat;
}

//destructor
~Tree();

//clear
void clear();

//add
void add_child( const Tree &tree );

//get children in current tree
Category_Sequence get_children() const;

};

#endif


  3 Responses to “Category : C++ Source Code
Archive   : CHARTP10.ZIP
Filename : TREE.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/