/*!
\file sheet.h
\brief
\author Martin Peters
$Date: 2010/03/29 20:35:21 $
$Revision: 1.6 $
----------------------------------------------------------------------------
MTK++ - C++ package of modeling libraries.
Copyright (C) 2005-2006 (see AUTHORS file for a list of contributors)
This file is part of MTK++.
MTK++ is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
MTK++ 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 Lessser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see .
----------------------------------------------------------------------------
*/
#ifndef SHEET_H
#define SHEET_H
#include
#include
#include
#include
#include
#include
#include
#include
#include "Utils/constants.h"
#include "table.h"
namespace MTKpp
{
//template class table;
// ============================================================
// Class : sheet()
// ------------------------------------------------------------
/*!
\class sheet
\brief
\author Martin Peters
\version 0.1
\date 2007
*/
// ============================================================
class sheet
{
public:
/*!
\brief sheet Constructor
*/
sheet();
//! sheet Destructor
virtual ~sheet();
/*!
\brief Set the name of the sheet
\param n sheet name
*/
void setName(std::string n);
/*!
\brief Get the name of the sheet
\return sheet name
*/
std::string getName();
/*!
\brief Add a table to the sheet
\return table pointer
*/
table* addTable();
/*!
\brief Add an integer table to the sheet
\return table pointer
*/
table* addIntTable();
/*!
\brief Add a string table to the sheet
\return table pointer
*/
table* addStringTable();
/*!
\brief Get a table by name
\param n table name
\return table name
*/
table* getTable(std::string n);
/*!
\brief Get an integer table by name
\param n table name
\return table name
*/
table* getIntTable(std::string n);
/*!
\brief Get tables
*/
std::vector*> getTables();
/*!
\brief Get the integer tables
*/
std::vector*> getIntTables();
/*!
\brief Delete all tables
*/
void clear();
protected:
//! sheet name
std::string itsName;
//! table pointer
table* pTable;
//! table pointer
table* pIntTable;
//! list of table pointers
std::vector*> tableList;
//! table iterator
typedef std::vector*>::iterator tableIterator;
//! list of int table pointers
std::vector*> intTableList;
//! int table iterator
typedef std::vector*>::iterator intTableIterator;
//! list of string table pointers
std::vector*> stringTableList;
//! string table iterator
typedef std::vector*>::iterator stringTableIterator;
};
}
#endif // SHEET_H