2012-09-01 16:40:18 +02:00
|
|
|
#ifndef PLAYERATTRIBUTES_H_D7THWFVV
|
|
|
|
#define PLAYERATTRIBUTES_H_D7THWFVV
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
struct Player
|
|
|
|
{
|
|
|
|
std::string name;
|
2018-03-25 16:03:11 +02:00
|
|
|
double x, y, z;
|
|
|
|
};
|
2012-09-01 16:40:18 +02:00
|
|
|
|
|
|
|
class PlayerAttributes
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
typedef std::list<Player> Players;
|
|
|
|
|
2018-03-25 16:03:11 +02:00
|
|
|
PlayerAttributes(const std::string &worldDir);
|
2012-09-01 16:40:18 +02:00
|
|
|
Players::iterator begin();
|
|
|
|
Players::iterator end();
|
|
|
|
|
|
|
|
private:
|
2018-03-25 16:03:11 +02:00
|
|
|
void readFiles(const std::string &playersPath);
|
|
|
|
void readSqlite(const std::string &db_name);
|
|
|
|
|
2012-09-01 16:40:18 +02:00
|
|
|
Players m_players;
|
2018-03-25 16:03:11 +02:00
|
|
|
};
|
2012-09-01 16:40:18 +02:00
|
|
|
|
|
|
|
#endif /* end of include guard: PLAYERATTRIBUTES_H_D7THWFVV */
|
|
|
|
|