The rounded corners look really dumb at this size.
[wxWidgets.git] / demos / life / reader.h
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 // Copyright: (c) 2000, Guillermo Rodriguez Garcia
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _LIFE_READER_H_
12 #define _LIFE_READER_H_
13
14 #include "game.h"
15
16 // --------------------------------------------------------------------------
17 // LifeReader
18 // --------------------------------------------------------------------------
19
20 class LifeReader
21 {
22 public:
23 LifeReader(wxInputStream& is);
24
25 inline bool IsOk() const { return m_ok; };
26 inline wxString GetDescription() const { return m_description; };
27 inline wxString GetRules() const { return m_rules; };
28 inline wxArrayString GetShape() const { return m_shape; };
29 inline LifePattern GetPattern() const
30 {
31 return LifePattern(wxEmptyString, m_description, m_rules, m_shape);
32 };
33
34 private:
35 bool m_ok;
36 wxString m_description;
37 wxString m_rules;
38 wxArrayString m_shape;
39 };
40
41 #endif // _LIFE_READER_H_