4db94043cb
Files correlati : Commento : Spostamento in libraries delle librerie esterne di Campo per una maggiore pulizia e organizzazione git-svn-id: svn://10.65.10.50/branches/R_10_00@24150 c028cbd2-c16b-5b4b-a496-9718f37d4682
55 lines
1.6 KiB
C++
55 lines
1.6 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: reader.h
|
|
// Purpose: Life! pattern reader (writer coming soon)
|
|
// Author: Guillermo Rodriguez Garcia, <guille@iies.es>
|
|
// Modified by:
|
|
// Created: Jan/2000
|
|
// RCS-ID: $Id: reader.h 35650 2005-09-23 12:56:45Z MR $
|
|
// Copyright: (c) 2000, Guillermo Rodriguez Garcia
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _LIFE_READER_H_
|
|
#define _LIFE_READER_H_
|
|
|
|
// for compilers that support precompilation, includes "wx/wx.h"
|
|
#include "wx/wxprec.h"
|
|
|
|
#ifdef __BORLANDC__
|
|
#pragma hdrstop
|
|
#endif
|
|
|
|
// for all others, include the necessary headers
|
|
#ifndef WX_PRECOMP
|
|
#include "wx/wx.h"
|
|
#endif
|
|
|
|
#include "game.h"
|
|
|
|
// --------------------------------------------------------------------------
|
|
// LifeReader
|
|
// --------------------------------------------------------------------------
|
|
|
|
class LifeReader
|
|
{
|
|
public:
|
|
LifeReader(wxInputStream& is);
|
|
|
|
inline bool IsOk() const { return m_ok; };
|
|
inline wxString GetDescription() const { return m_description; };
|
|
inline wxString GetRules() const { return m_rules; };
|
|
inline wxArrayString GetShape() const { return m_shape; };
|
|
inline LifePattern GetPattern() const
|
|
{
|
|
return LifePattern(wxEmptyString, m_description, m_rules, m_shape);
|
|
};
|
|
|
|
private:
|
|
bool m_ok;
|
|
wxString m_description;
|
|
wxString m_rules;
|
|
wxArrayString m_shape;
|
|
};
|
|
|
|
#endif // _LIFE_READER_H_
|