32 lines
625 B
C++
32 lines
625 B
C++
#pragma once
|
|
|
|
#include <bitset>
|
|
|
|
namespace mtb
|
|
{
|
|
|
|
class Attr
|
|
{
|
|
public:
|
|
|
|
a8::reflect::Class* GetClass() const;
|
|
int attr_id() const { return attr_id_; };
|
|
const std::string attr_cname() const { return attr_cname_; };
|
|
const std::string attr_ename() const { return attr_ename_; };
|
|
|
|
bool has_attr_id() const { return __flags__.test(0);};
|
|
bool has_attr_cname() const { return __flags__.test(1);};
|
|
bool has_attr_ename() const { return __flags__.test(2);};
|
|
|
|
protected:
|
|
|
|
int attr_id_ = 0;
|
|
std::string attr_cname_;
|
|
std::string attr_ename_;
|
|
|
|
public:
|
|
std::bitset<3> __flags__;
|
|
};
|
|
|
|
};
|