Source code for cfxdb.gen.meta.Doc

# automatically generated by the FlatBuffers compiler, do not modify

# namespace: meta

import flatbuffers
from flatbuffers.compat import import_numpy

[docs] np = import_numpy()
# Generic **object documentation** attached to objects in other tables. Primary key of this table is ``oid``.
[docs] class Doc(object):
[docs] __slots__ = ["_tab"]
@classmethod
[docs] def GetRootAs(cls, buf, offset=0): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = Doc() x.Init(buf, n + offset) return x
@classmethod
[docs] def GetRootAsDoc(cls, buf, offset=0): """This method is deprecated. Please switch to GetRootAs.""" return cls.GetRootAs(buf, offset)
# Doc
[docs] def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos)
# OID of the documentation (version). # Doc
[docs] def Oid(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return self._tab.String(o + self._tab.Pos) return None
# Table of the object being documented. # Doc
[docs] def TableOid(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: a = self._tab.Vector(o) return self._tab.Get( flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1) ) return 0
# Doc
[docs] def TableOidAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o) return 0
# Doc
[docs] def TableOidLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return self._tab.VectorLen(o) return 0
# Doc
[docs] def TableOidIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) return o == 0
# Object (within the table) being documented. # Doc
[docs] def ObjectOid(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: a = self._tab.Vector(o) return self._tab.Get( flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1) ) return 0
# Doc
[docs] def ObjectOidAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o) return 0
# Doc
[docs] def ObjectOidLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return self._tab.VectorLen(o) return 0
# Doc
[docs] def ObjectOidIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) return o == 0
# When the documentation (version) was created or modified. # Doc
[docs] def Modified(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) return 0
# Documentation text format. # Doc
[docs] def Format(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) return 0
# The actual documentation, serialized according to the documentation format. # Doc
[docs] def Document(self, j): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: a = self._tab.Vector(o) return self._tab.Get( flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1) ) return 0
# Doc
[docs] def DocumentAsNumpy(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o) return 0
# Doc
[docs] def DocumentLength(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: return self._tab.VectorLen(o) return 0
# Doc
[docs] def DocumentIsNone(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) return o == 0
[docs] def DocStart(builder): builder.StartObject(6)
[docs] def Start(builder): DocStart(builder)
[docs] def DocAddOid(builder, oid): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(oid), 0)
[docs] def AddOid(builder, oid): DocAddOid(builder, oid)
[docs] def DocAddTableOid(builder, tableOid): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(tableOid), 0)
[docs] def AddTableOid(builder, tableOid): DocAddTableOid(builder, tableOid)
[docs] def DocStartTableOidVector(builder, numElems): return builder.StartVector(1, numElems, 1)
[docs] def StartTableOidVector(builder, numElems: int) -> int: return DocStartTableOidVector(builder, numElems)
[docs] def DocAddObjectOid(builder, objectOid): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(objectOid), 0)
[docs] def AddObjectOid(builder, objectOid): DocAddObjectOid(builder, objectOid)
[docs] def DocStartObjectOidVector(builder, numElems): return builder.StartVector(1, numElems, 1)
[docs] def StartObjectOidVector(builder, numElems: int) -> int: return DocStartObjectOidVector(builder, numElems)
[docs] def DocAddModified(builder, modified): builder.PrependUint64Slot(3, modified, 0)
[docs] def AddModified(builder, modified): DocAddModified(builder, modified)
[docs] def DocAddFormat(builder, format): builder.PrependUint8Slot(4, format, 0)
[docs] def AddFormat(builder, format): DocAddFormat(builder, format)
[docs] def DocAddDocument(builder, document): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(document), 0)
[docs] def AddDocument(builder, document): DocAddDocument(builder, document)
[docs] def DocStartDocumentVector(builder, numElems): return builder.StartVector(1, numElems, 1)
[docs] def StartDocumentVector(builder, numElems: int) -> int: return DocStartDocumentVector(builder, numElems)
[docs] def DocEnd(builder): return builder.EndObject()
[docs] def End(builder): return DocEnd(builder)