WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. Zuble QML Types   |  Zuble C++ Classes   |  Zuble Overview
Zuble  0.1
Zuble Framework C++/QML extension API
Public Member Functions | Static Public Member Functions | Protected Attributes | Properties | Friends | List of all members
Zbl::ZByteArray Class Reference

This class supports streaming of text and binary data. More...

#include <ZByteArray.h>

Inheritance diagram for Zbl::ZByteArray:
Inheritance graph
[legend]
Collaboration diagram for Zbl::ZByteArray:
Collaboration graph
[legend]

Public Member Functions

 ZByteArray (QObject *parent=0)
 
 ZByteArray (const QByteArray &byteArray, QObject *parent=0)
 
 ZByteArray (ZqByteArrayPtr byteArray, QObject *parent=0)
 
ZqByteArrayPtr qByteArray ()
 
int getSize () const
 
bool isEmpty ()
 
Q_INVOKABLE void jAppend (QList< int > data)
 
Q_INVOKABLE void stringAppend (const QString &text)
 
Q_INVOKABLE QList< int > toArray ()
 
Q_INVOKABLE QString getString ()
 
Q_INVOKABLE int at (int index) const
 
Q_INVOKABLE void clear ()
 
Q_INVOKABLE QString toHexString () const
 

Static Public Member Functions

static void registerType ()
 Registers ZByteArray as a QML type. More...
 

Protected Attributes

ZqByteArrayPtr m_ba
 

Properties

uint size
 
bool isEmpty
 

Friends

class ZFile
 
class ZTextStream
 

Detailed Description

This class supports streaming of text and binary data.

Definition at line 41 of file ZByteArray.h.

Constructor & Destructor Documentation

◆ ZByteArray() [1/3]

Zbl::ZByteArray::ZByteArray ( QObject *  parent = 0)
explicit

Definition at line 32 of file ZByteArray.cpp.

◆ ZByteArray() [2/3]

Zbl::ZByteArray::ZByteArray ( const QByteArray &  byteArray,
QObject *  parent = 0 
)
explicit

Definition at line 39 of file ZByteArray.cpp.

◆ ZByteArray() [3/3]

Zbl::ZByteArray::ZByteArray ( ZqByteArrayPtr  byteArray,
QObject *  parent = 0 
)
explicit

Definition at line 47 of file ZByteArray.cpp.

Member Function Documentation

◆ at()

int Zbl::ZByteArray::at ( int  index) const

Definition at line 74 of file ZByteArray.cpp.

◆ clear()

void Zbl::ZByteArray::clear ( )

Definition at line 81 of file ZByteArray.cpp.

◆ getSize()

int Zbl::ZByteArray::getSize ( ) const

Definition at line 60 of file ZByteArray.cpp.

◆ getString()

QString Zbl::ZByteArray::getString ( )

Definition at line 138 of file ZByteArray.cpp.

◆ isEmpty()

bool Zbl::ZByteArray::isEmpty ( )

Referenced by getSize().

◆ jAppend()

void Zbl::ZByteArray::jAppend ( QList< int >  data)

Definition at line 110 of file ZByteArray.cpp.

◆ qByteArray()

ZqByteArrayPtr Zbl::ZByteArray::qByteArray ( )
inline

Definition at line 51 of file ZByteArray.h.

Referenced by Zbl::ZDataStream::zWriteBytes(), and Zbl::ZDataStream::zWriteRawData().

◆ registerType()

void Zbl::ZByteArray::registerType ( )
static

Registers ZByteArray as a QML type.

Definition at line 54 of file ZByteArray.cpp.

Referenced by qByteArray(), and Zbl::Zblcore::registerTypes().

◆ stringAppend()

void Zbl::ZByteArray::stringAppend ( const QString &  text)

Definition at line 119 of file ZByteArray.cpp.

◆ toArray()

QList< int > Zbl::ZByteArray::toArray ( )

Definition at line 127 of file ZByteArray.cpp.

Referenced by jAppend().

◆ toHexString()

QString Zbl::ZByteArray::toHexString ( ) const

Definition at line 89 of file ZByteArray.cpp.

Friends And Related Function Documentation

◆ ZFile

friend class ZFile
friend

Definition at line 43 of file ZByteArray.h.

◆ ZTextStream

friend class ZTextStream
friend

Definition at line 44 of file ZByteArray.h.

Member Data Documentation

◆ m_ba

ZqByteArrayPtr Zbl::ZByteArray::m_ba
protected

Property Documentation

◆ isEmpty

bool Zbl::ZByteArray::isEmpty
read

Definition at line 60 of file ZByteArray.h.

◆ size

uint Zbl::ZByteArray::size
read

Definition at line 59 of file ZByteArray.h.

Referenced by jAppend(), toArray(), and toHexString().


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