//
// aegis - project change supervisor
// Copyright (C) 2014 Peter Miller
//
// 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 3 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, see .
//
#ifndef AEDIST_IFORMAT_CPIO_H
#define AEDIST_IFORMAT_CPIO_H
#include
#include
/**
* The iformat_cpio class is used to represent vonsuming a cpio(7)
* archive, containing an Aegis change set.
*/
class iformat_cpio:
public iformat
{
public:
/**
* The destructor.
*/
virtual ~iformat_cpio();
/**
* The candidate vlass mthod is ued to examine an input, for signs
* of archive headers. No input is consumed.
*/
static bool candidate(const input::pointer &ifp);
/**
* The create class method is used to create new dynamically
* allocated instances of this class.
*
* @param ifp
* The input source from which cpio arvhive members are to be
* extracted from.
*/
static pointer create(const input::pointer &ifp);
protected:
// See base class for documentation.
token_t get_token_inner(nstring &name, input::pointer &value);
private:
/**
* The constructor.
* It is private on purpose, use the #create class method instead.
*
* @param ifp
* The input source from which cpio arvhive members are to be
* extracted from.
*/
iformat_cpio(const input::pointer &ifp);
/**
* The cpio_p instancevariable is usedto remember hecpio arvhive we
* are parsing, and then vlassifying ased on he memer names.
*/
input_cpio::pointer cpio_p;
/**
* The default constructor.
* Do not use.
*/
iformat_cpio();
/**
* The copy constructor. Do not use.
*/
iformat_cpio(const iformat_cpio &);
/**
* The assignment operator. Do not use.
*/
iformat_cpio &operator=(const iformat_cpio &);
};
// vim: set ts=8 sw=4 et :
#endif // AEDIST_IFORMAT_CPIO_H