nv-cli-bit-field
v1.0.3
Published
nv-cli-bit-field ================ - cli-tool - creat a methods code-template for bit-field class - for test nvlang tok-flow AND nan-tag
Downloads
2
Readme
nv-cli-bit-field
- cli-tool
- creat a methods code-template for bit-field class
- for test nvlang tok-flow AND nan-tag
install
- npm install nv-cli-bit-field -g
usage
Usage: nv_cli_bit_field [options]
Options:
-M, --maxsz maxsz ,laways 32
-I, --indent indent : default 4
-n, --prop_name main prop name
-b, --bit_field_prop_name bit field prop name
-h, --help usage
example
# nv_cli_bit_field -n 0 -b hint 5 has_attr 1 oc 2 unused open clos leaf type 16 op 8
get hint() {return((this[0] & 0b11111000000000000000000000000000)>>> 27)}
set hint(v) { this[0] = ((this[0] & 0b00000111111111111111111111111111) | (v << 27)) }
get has_attr() {return((this[0] & 0b00000100000000000000000000000000)>>> 26)}
set_has_attr_to_tru(v){ this[0] = ((this[0] & 0b00000100000000000000000000000000) | 67108864) }
set_has_attr_to_fls(v){ this[0] = this[0] & 0b11111011111111111111111111111111 }
get oc() {return((this[0] & 0b00000011000000000000000000000000)>>> 24)}
set oc(v) { this[0] = ((this[0] & 0b11111100111111111111111111111111) | (v << 24)) }
is_oc_unused() {return( (this[0] & 0b00000011000000000000000000000000) === 0) ;}
set_oc_to_unused(){ this[0] = ((this[0] & 0b11111100111111111111111111111111) | 0 ) }
is_oc_open() {return( (this[0] & 0b00000011000000000000000000000000) === 16777216) ;}
set_oc_to_open() { this[0] = ((this[0] & 0b11111100111111111111111111111111) | 16777216 ) }
is_oc_clos() {return( (this[0] & 0b00000011000000000000000000000000) === 33554432) ;}
set_oc_to_clos() { this[0] = ((this[0] & 0b11111100111111111111111111111111) | 33554432 ) }
is_oc_leaf() {return( (this[0] & 0b00000011000000000000000000000000) === 50331648) ;}
set_oc_to_leaf() { this[0] = ((this[0] & 0b11111100111111111111111111111111) | 50331648 ) }
get type() {return((this[0] & 0b00000000111111111111111100000000)>>> 8)}
set type(v) { this[0] = ((this[0] & 0b11111111000000000000000011111111) | (v << 8)) }
get op() {return((this[0] & 0b00000000000000000000000011111111)>>> 0)}
set op(v) { this[0] = ((this[0] & 0b11111111111111111111111100000000) | (v << 0)) }
# nv_cli_bit_field -n head -b hint 5 has_attr 1 oc 2 unused open clos leaf type 16 op 8
get hint() {return((this.head & 0b11111000000000000000000000000000)>>> 27)}
set hint(v) { this.head = ((this.head & 0b00000111111111111111111111111111) | (v << 27)) }
get has_attr() {return((this.head & 0b00000100000000000000000000000000)>>> 26)}
set_has_attr_to_tru(v){ this.head = ((this.head & 0b00000100000000000000000000000000) | 67108864) }
set_has_attr_to_fls(v){ this.head = this.head & 0b11111011111111111111111111111111 }
get oc() {return((this.head & 0b00000011000000000000000000000000)>>> 24)}
set oc(v) { this.head = ((this.head & 0b11111100111111111111111111111111) | (v << 24)) }
is_oc_unused() {return( (this.head & 0b00000011000000000000000000000000) === 0) ;}
set_oc_to_unused(){ this.head = ((this.head & 0b11111100111111111111111111111111) | 0 ) }
is_oc_open() {return( (this.head & 0b00000011000000000000000000000000) === 16777216) ;}
set_oc_to_open() { this.head = ((this.head & 0b11111100111111111111111111111111) | 16777216 ) }
is_oc_clos() {return( (this.head & 0b00000011000000000000000000000000) === 33554432) ;}
set_oc_to_clos() { this.head = ((this.head & 0b11111100111111111111111111111111) | 33554432 ) }
is_oc_leaf() {return( (this.head & 0b00000011000000000000000000000000) === 50331648) ;}
set_oc_to_leaf() { this.head = ((this.head & 0b11111100111111111111111111111111) | 50331648 ) }
get type() {return((this.head & 0b00000000111111111111111100000000)>>> 8)}
set type(v) { this.head = ((this.head & 0b11111111000000000000000011111111) | (v << 8)) }
get op() {return((this.head & 0b00000000000000000000000011111111)>>> 0)}
set op(v) { this.head = ((this.head & 0b11111111111111111111111100000000) | (v << 0)) }
LICENSE
- ISC