feisty meow concerns codebase 2.140
filename_tree.h
Go to the documentation of this file.
1#ifndef FILENAME_TREE_CLASS
2#define FILENAME_TREE_CLASS
3
4/*****************************************************************************\
5* *
6* Name : filename_tree *
7* Author : Chris Koeritz *
8* *
9*******************************************************************************
10* Copyright (c) 2004-$now By Author. This program is free software; you can *
11* redistribute it and/or modify it under the terms of the GNU General Public *
12* License as published by the Free Software Foundation; either version 2 of *
13* the License or (at your option) any later version. This is online at: *
14* http://www.fsf.org/copyleft/gpl.html *
15* Please send any updates to: fred@gruntose.com *
16\*****************************************************************************/
17
19
26#include "filename_list.h"
27
28#include <nodes/packable_tree.h>
29
30namespace filesystem {
31
33{
34public:
37 int _depth;
38
40
41 virtual ~filename_tree();
42
43 virtual int packed_size() const;
44
45 virtual void pack(basis::byte_array &packed_form) const;
46
47 virtual bool unpack(basis::byte_array &packed_form);
48};
49
51
53{
54public:
58};
59
60} //namespace.
61
62#endif
63
A very common template for a dynamic array of bytes.
Definition byte_array.h:36
int _depth
how far below root node are we.
filename_list _files
the filenames that are at this node in the tree.
filename _dirname
the full directory name at this position.
virtual int packed_size() const
Estimates the space needed for the packed structure.
virtual void pack(basis::byte_array &packed_form) const
Creates a packed form of the packable object in "packed_form".
virtual bool unpack(basis::byte_array &packed_form)
Restores the packable from the "packed_form".
Provides operations commonly needed on file names.
Definition filename.h:64
this is the tree factory used in the recursive_unpack.
virtual nodes::packable_tree * create()
implements the create() method for filename_trees to support packing.
A tree object that can be packed into an array of bytes and unpacked again.
A platform independent way to obtain the timestamp of a file.