]> git.saurik.com Git - wxWidgets.git/blame - demos/life/reader.h
initialize the variable as XtVaGetValues() may not do it apparently
[wxWidgets.git] / demos / life / reader.h
CommitLineData
f6bcfd97
BP
1/////////////////////////////////////////////////////////////////////////////
2// Name: reader.h
3// Purpose: Life! pattern reader (writer coming soon)
4// Author: Guillermo Rodriguez Garcia, <guille@iies.es>
5// Modified by:
6// Created: Jan/2000
7// RCS-ID: $Id$
8// Copyright: (c) 2000, Guillermo Rodriguez Garcia
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _LIFE_READER_H_
13#define _LIFE_READER_H_
14
f6bcfd97
BP
15// for compilers that support precompilation, includes "wx/wx.h"
16#include "wx/wxprec.h"
17
18#ifdef __BORLANDC__
19 #pragma hdrstop
20#endif
21
22// for all others, include the necessary headers
23#ifndef WX_PRECOMP
24 #include "wx/wx.h"
25#endif
26
27#include "game.h"
28
29// --------------------------------------------------------------------------
30// LifeReader
31// --------------------------------------------------------------------------
32
33class LifeReader
34{
35public:
36 LifeReader(wxInputStream& is);
37
38 inline bool IsOk() const { return m_ok; };
39 inline wxString GetDescription() const { return m_description; };
40 inline wxString GetRules() const { return m_rules; };
41 inline wxArrayString GetShape() const { return m_shape; };
42 inline LifePattern GetPattern() const
43 {
5d2ac6b8 44 return LifePattern(wxEmptyString, m_description, m_rules, m_shape);
f6bcfd97
BP
45 };
46
47private:
48 bool m_ok;
49 wxString m_description;
50 wxString m_rules;
51 wxArrayString m_shape;
52};
53
54#endif // _LIFE_READER_H_