Blame src/lib/WP1VariableLengthGroup.h

Packit Service 9d1170
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
Packit Service 9d1170
/* libwpd
Packit Service 9d1170
 * Version: MPL 2.0 / LGPLv2.1+
Packit Service 9d1170
 *
Packit Service 9d1170
 * This Source Code Form is subject to the terms of the Mozilla Public
Packit Service 9d1170
 * License, v. 2.0. If a copy of the MPL was not distributed with this
Packit Service 9d1170
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
Packit Service 9d1170
 *
Packit Service 9d1170
 * Major Contributor(s):
Packit Service 9d1170
 * Copyright (C) 2003 William Lachance (wrlach@gmail.com)
Packit Service 9d1170
 * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
Packit Service 9d1170
 * Copyright (c) 2006 Fridrich Strba (fridrich.strba@bluewin.ch)
Packit Service 9d1170
 *
Packit Service 9d1170
 * For minor contributions see the git repository.
Packit Service 9d1170
 *
Packit Service 9d1170
 * Alternatively, the contents of this file may be used under the terms
Packit Service 9d1170
 * of the GNU Lesser General Public License Version 2.1 or later
Packit Service 9d1170
 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
Packit Service 9d1170
 * applicable instead of those above.
Packit Service 9d1170
 *
Packit Service 9d1170
 * For further information visit http://libwpd.sourceforge.net
Packit Service 9d1170
 */
Packit Service 9d1170
Packit Service 9d1170
/* "This product is not manufactured, approved, or supported by
Packit Service 9d1170
 * Corel Corporation or Corel Corporation Limited."
Packit Service 9d1170
 */
Packit Service 9d1170
Packit Service 9d1170
#ifndef WP1VARIABLELENGTHGROUP_H
Packit Service 9d1170
#define WP1VARIABLELENGTHGROUP_H
Packit Service 9d1170
Packit Service 9d1170
#include "WP1Part.h"
Packit Service 9d1170
Packit Service 9d1170
class WP1VariableLengthGroup : public WP1Part
Packit Service 9d1170
{
Packit Service 9d1170
public:
Packit Service 9d1170
	WP1VariableLengthGroup(unsigned char group); // WP1VariableLengthGroup should _never_ be constructed, only its inherited classes
Packit Service 9d1170
	~WP1VariableLengthGroup() override {}
Packit Service 9d1170
Packit Service 9d1170
	static WP1VariableLengthGroup *constructVariableLengthGroup(librevenge::RVNGInputStream *input, WPXEncryption *encryption, unsigned char group);
Packit Service 9d1170
Packit Service 9d1170
	static bool isGroupConsistent(librevenge::RVNGInputStream *input, WPXEncryption *encryption, const unsigned char group);
Packit Service 9d1170
Packit Service 9d1170
protected:
Packit Service 9d1170
	void _read(librevenge::RVNGInputStream *input, WPXEncryption *encryption);
Packit Service 9d1170
	virtual void _readContents(librevenge::RVNGInputStream *input, WPXEncryption *encryption) = 0;
Packit Service 9d1170
Packit Service 9d1170
	unsigned char getGroup() const
Packit Service 9d1170
	{
Packit Service 9d1170
		return m_group;
Packit Service 9d1170
	}
Packit Service 9d1170
	unsigned getSize() const
Packit Service 9d1170
	{
Packit Service 9d1170
		return m_size;
Packit Service 9d1170
	}
Packit Service 9d1170
Packit Service 9d1170
private:
Packit Service 9d1170
	unsigned char m_group;
Packit Service 9d1170
	unsigned m_size;
Packit Service 9d1170
};
Packit Service 9d1170
Packit Service 9d1170
#endif /* WP1VARIABLELENGTHGROUP_H */
Packit Service 9d1170
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */