23 lines
527 B
C++
23 lines
527 B
C++
|
#ifndef PORYGONLANG_RETRIEVEDUSERDATA_HPP
|
||
|
#define PORYGONLANG_RETRIEVEDUSERDATA_HPP
|
||
|
|
||
|
#include "UserData.hpp"
|
||
|
|
||
|
namespace Porygon::UserData{
|
||
|
class RetrievedUserData{
|
||
|
UserData* _ud;
|
||
|
uint32_t _key;
|
||
|
public:
|
||
|
explicit RetrievedUserData(UserData* ud) : _ud(ud), _key(0){}
|
||
|
explicit RetrievedUserData(uint32_t id) : _ud(nullptr), _key(id){}
|
||
|
|
||
|
UserData * Get();
|
||
|
|
||
|
inline uint32_t GetKey() const{
|
||
|
return _key;
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif //PORYGONLANG_RETRIEVEDUSERDATA_HPP
|