class ArrayFieldDeclaration(FieldDeclaration):
- """Do not instantiate."""
+ """
+ Static array field declaration.
+ """
def __init__(self):
raise NotImplementedError("ArrayFieldDeclaration cannot be instantiated")
@property
def length(self):
"""
- Return the length of an array or a negative
- value on error.
+ Static array's fixed length (number of contained elements), or
+ a negative value on error.
"""
return nbt._bt_ctf_get_array_len(self._fd)
@property
def element_declaration(self):
"""
- Return element declaration.
+ Underlying element's field declaration.
"""
field_decl_ptr = nbt._bt_python_get_array_element_declaration(self._fd)
class SequenceFieldDeclaration(FieldDeclaration):
- """Do not instantiate."""
+ """
+ Sequence (dynamic array) field declaration.
+
+ .. note::
+
+ As of this version, this class is missing some properties.
+ """
def __init__(self):
raise NotImplementedError("SequenceFieldDeclaration cannot be instantiated")
@property
def element_declaration(self):
"""
- Return element declaration.
+ Underlying element's field declaration.
"""
field_decl_ptr = nbt._bt_python_get_sequence_element_declaration(self._fd)
class FloatFieldDeclaration(FieldDeclaration):
- """Do not instantiate."""
+ """
+ Floating point number field declaration.
+
+ .. note::
+
+ As of this version, this class is missing some properties.
+ """
def __init__(self):
raise NotImplementedError("FloatFieldDeclaration cannot be instantiated")
class StructureFieldDeclaration(FieldDeclaration):
- """Do not instantiate."""
+ """
+ Structure (ordered map of field names to field declarations) field
+ declaration.
+
+ .. note::
+
+ As of this version, this class is missing some properties.
+ """
def __init__(self):
raise NotImplementedError("StructureFieldDeclaration cannot be instantiated")
class StringFieldDeclaration(FieldDeclaration):
- """Do not instantiate."""
+ """
+ String (NULL-terminated array of bytes) field declaration.
+
+ .. note::
+
+ As of this version, this class is missing some properties.
+ """
def __init__(self):
raise NotImplementedError("StringFieldDeclaration cannot be instantiated")
class VariantFieldDeclaration(FieldDeclaration):
- """Do not instantiate."""
+ """
+ Variant (dynamic selection between different types) field declaration.
+
+ .. note::
+
+ As of this version, this class is missing some properties.
+ """
def __init__(self):
raise NotImplementedError("VariantFieldDeclaration cannot be instantiated")