Resource constructor
Resource( - ResourceType type, {
- String? name,
- String? pattern,
- bool? create = false,
- bool? delete = false,
- bool? manage = false,
- bool? read = false,
- bool? write = false,
- bool? get = false,
- bool? update = false,
- bool? join = false,
- int bit = 0,
})
Implementation
Resource(this.type,
{this.name,
this.pattern,
bool? create = false,
bool? delete = false,
bool? manage = false,
bool? read = false,
bool? write = false,
bool? get = false,
bool? update = false,
bool? join = false,
int bit = 0})
: _bit = bit {
if (join == true) _bit |= 128;
if (update == true) _bit |= 64;
if (get == true) _bit |= 32;
if (create == true) _bit |= 16;
if (delete == true) _bit |= 8;
if (manage == true) _bit |= 4;
if (write == true) _bit |= 2;
if (read == true) _bit |= 1;
}