1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #ifndef _ATTRBOOL_H
- #define _ATTRBOOL_H
- #include "attribute.h"
- class _bool : public Attribute {
- public:
-
- _bool(const wchar_t *name=NULL, int default_val=0) : Attribute(name) {
- setValueAsInt(!!default_val, true);
- }
-
-
- operator bool() { return !!getValueAsInt(); }
-
-
- bool operator =(int newval) { setValueAsInt(!!newval); return *this; }
-
-
- virtual int getAttributeType() { return AttributeType::BOOL; }
-
-
- virtual const wchar_t *getConfigGroup() { return L"studio.configgroup.bool"; }
- };
- #endif
|