Logo Search packages:      
Sourcecode: tardy version File versions  Download package

remove_prefix_count.h

//
//    srecord - manipulate eprom load files
//    Copyright (C) 2004 Peter Miller;
//    All rights reserved.
//
//    This program is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program; if not, write to the Free Software
//    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
//
// MANIFEST: interface definition for tar_input_filter_remove_prefix_count class
//

#ifndef COMMON_TAR_INPUT_FILTER_REMOVE_PREFIX_COUNT_H
#define COMMON_TAR_INPUT_FILTER_REMOVE_PREFIX_COUNT_H

#pragma interface "tar_input_filter_remove_prefix_count"

#include <tar/input/filter.h>

/**
  * The tar_input_filter_remove_prefix_count class is used to represent
  * an input filter which remove leading path prefixes, specifying how
  * many path prefixes to be removed.
  */
00035 class tar_input_filter_remove_prefix_count:
    public tar_input_filter
{
public:
    /**
      * The destructor.
      */
    virtual ~tar_input_filter_remove_prefix_count();

    /**
      * The constructor.
      *
      * \param deeper
      *     The input source to be filtered.
      * \param count
      *     The number of leading directories to be removed.
      */
    tar_input_filter_remove_prefix_count(tar_input *deeper, int count);

    // See base class for documentation.
    int read_header(tar_header&);

private:
    /**
      * The fp instance variable is used to remember the deeper input
      * source which we will be filtering.
      */
00062     tar_input *fp;

    /**
      * The count instance variable is used to remember how many levels
      * of leading directories are to be removed.
      */
00068     int count;

    /**
      * The default constructor.  Do not use.
      */
    tar_input_filter_remove_prefix_count();

    /**
      * The copy constructor.  Do not use.
      */
    tar_input_filter_remove_prefix_count(
      const tar_input_filter_remove_prefix_count &);

    /**
      * The assignment operator.  Do not use.
      */
    tar_input_filter_remove_prefix_count &operator=(
      const tar_input_filter_remove_prefix_count &);
};

#endif // COMMON_TAR_INPUT_FILTER_REMOVE_PREFIX_COUNT_H

Generated by  Doxygen 1.6.0   Back to index