File: PlayerAttributes.h

package info (click to toggle)
minetestmapper 20200328-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 252 kB
  • sloc: cpp: 2,454; sh: 65; ansic: 32; makefile: 9
file content (30 lines) | stat: -rw-r--r-- 530 bytes parent folder | download | duplicates (2)
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
#ifndef PLAYERATTRIBUTES_H_D7THWFVV
#define PLAYERATTRIBUTES_H_D7THWFVV

#include <list>
#include <string>

struct Player
{
	std::string name;
	double x, y, z;
};

class PlayerAttributes
{
public:
	typedef std::list<Player> Players;

	PlayerAttributes(const std::string &worldDir);
	Players::iterator begin();
	Players::iterator end();

private:
	void readFiles(const std::string &playersPath);
	void readSqlite(const std::string &db_name);

	Players m_players;
};

#endif /* end of include guard: PLAYERATTRIBUTES_H_D7THWFVV */