File: WorldHelper.h

package info (click to toggle)
worlded 0.1.3-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,040 kB
  • ctags: 1,570
  • sloc: cpp: 8,093; ansic: 6,198; sh: 3,528; makefile: 417; yacc: 316; sed: 16
file content (38 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef WE_WORLDBACKEND_H
#define WE_WORLDBACKEND_H

#include "World.h"

class ViewWidget;

class WorldHelper
{
      World* m_World;

   public:
      WorldHelper ();
      virtual ~WorldHelper();
      
      // World operations
      void NewWorld(const std::string& path,
		    const std::string& name, int w, int h);
      void Load(const std::string& path);
      void Write() const;


      // Wrapper functions around the World member
      bool CanSave() const;
      bool IsChanged() const;

      // Wrapper functions around the World member
      const std::string& GetFileName() const;
      void SetFileName(const std::string& path);

      virtual World* GetWorld();

      // Called whenever the view widget is changed.
      void SetView (ViewWidget* view);
};


#endif