Nyx Node
Loading...
Searching...
No Matches
nyx.json.json_boolean.NyxBoolean Class Reference

JSON boolean object. More...

Inheritance diagram for nyx.json.json_boolean.NyxBoolean:
Collaboration diagram for nyx.json.json_boolean.NyxBoolean:

Public Member Functions

 __init__ (self, int|float|bool|None value=None, int|None ptr=None)
 Allocates a new JSON boolean object or wraps one.
bool value (self)
 Gets the value of this JSON boolean object.
bool value (self, bool value)
 Sets the value of this JSON boolean object.
Public Member Functions inherited from nyx.obj.NyxObject
 __init__ (self, int ptr)
 Wraps a C JSON object pointer.
typing.Callable on (self, typing.Callable callback)
 Registers a callback triggered when clients modify this object.
bool notify (self)
 Notifies this Nyx / INDI object to the clients.
str to_string (self, bool json_string=True)
 Returns a string representing this JSON object.
NyxXMLDoc to_xmldoc (self)
 Converts this JSON Nyx / INDI command to the XML one.

Additional Inherited Members

Static Public Member Functions inherited from nyx.obj.NyxObject
NyxObject from_string (str string)
 Parses a JSON object from a string.

Detailed Description

JSON boolean object.

Definition at line 13 of file json_boolean.py.

Constructor & Destructor Documentation

◆ __init__()

nyx.json.json_boolean.NyxBoolean.__init__ ( self,
int | float | bool | None value = None,
int | None ptr = None )

Allocates a new JSON boolean object or wraps one.

Parameters
valueOptional default value.
ptrOptional JSON boolean object pointer.

Definition at line 20 of file json_boolean.py.

Member Function Documentation

◆ value() [1/2]

bool nyx.json.json_boolean.NyxBoolean.value ( self)

Gets the value of this JSON boolean object.

Returns
The current value.

Definition at line 51 of file json_boolean.py.

◆ value() [2/2]

bool nyx.json.json_boolean.NyxBoolean.value ( self,
bool value )

Sets the value of this JSON boolean object.

Returns
True if the value was modified, False otherwise.

Definition at line 63 of file json_boolean.py.


The documentation for this class was generated from the following file: