Qt 4.8
Public Functions | Public Variables | Private Functions | List of all members
QDBusDemarshaller Class Reference

#include <qdbusargument_p.h>

Inheritance diagram for QDBusDemarshaller:
QDBusArgumentPrivate

Public Functions

bool atEnd ()
 
QDBusDemarshallerbeginArray ()
 
QDBusDemarshallerbeginCommon ()
 
QDBusDemarshallerbeginMap ()
 
QDBusDemarshallerbeginMapEntry ()
 
QDBusDemarshallerbeginStructure ()
 
void close ()
 
QString currentSignature ()
 
QDBusArgument::ElementType currentType ()
 
QDBusArgument duplicate ()
 
QDBusDemarshallerendArray ()
 
QDBusDemarshallerendCommon ()
 
QDBusDemarshallerendMap ()
 
QDBusDemarshallerendMapEntry ()
 
QDBusDemarshallerendStructure ()
 
bool isCurrentTypeStringLike ()
 
 QDBusDemarshaller (int flags)
 
bool toBool ()
 
uchar toByte ()
 
QByteArray toByteArray ()
 
double toDouble ()
 
int toInt ()
 
qlonglong toLongLong ()
 
QDBusObjectPath toObjectPath ()
 
short toShort ()
 
QDBusSignature toSignature ()
 
QString toString ()
 
QStringList toStringList ()
 
uint toUInt ()
 
qulonglong toULongLong ()
 
QDBusUnixFileDescriptor toUnixFileDescriptor ()
 
ushort toUShort ()
 
QDBusVariant toVariant ()
 
QVariant toVariantInternal ()
 
 ~QDBusDemarshaller ()
 
- Public Functions inherited from QDBusArgumentPrivate
QDBusDemarshallerdemarshaller ()
 
QDBusMarshallermarshaller ()
 
 QDBusArgumentPrivate (int flags=0)
 
 ~QDBusArgumentPrivate ()
 

Public Variables

DBusMessageIter iterator
 
QDBusDemarshallerparent
 
- Public Variables inherited from QDBusArgumentPrivate
int capabilities
 
enum QDBusArgumentPrivate::Direction direction
 
DBusMessage * message
 
QAtomicInt ref
 

Private Functions

QByteArray toByteArrayUnchecked ()
 
QDBusObjectPath toObjectPathUnchecked ()
 
QDBusSignature toSignatureUnchecked ()
 
QStringList toStringListUnchecked ()
 
QString toStringUnchecked ()
 

Additional Inherited Members

- Public Types inherited from QDBusArgumentPrivate
enum  Direction { Marshalling, Demarshalling }
 
- Static Public Functions inherited from QDBusArgumentPrivate
static bool checkRead (QDBusArgumentPrivate *d)
 
static bool checkReadAndDetach (QDBusArgumentPrivate *&d)
 
static bool checkWrite (QDBusArgumentPrivate *&d)
 
static QDBusArgument create (QDBusArgumentPrivate *d)
 
static QByteArray createSignature (int id)
 
static QDBusArgumentPrivated (QDBusArgument &q)
 

Detailed Description

Definition at line 161 of file qdbusargument_p.h.

Constructors and Destructors

◆ QDBusDemarshaller()

QDBusDemarshaller::QDBusDemarshaller ( int  flags)
inline

Definition at line 164 of file qdbusargument_p.h.

Referenced by beginCommon(), and duplicate().

164  : QDBusArgumentPrivate(flags), parent(0)
165  { direction = Demarshalling; }
QDBusDemarshaller * parent
enum QDBusArgumentPrivate::Direction direction
QDBusArgumentPrivate(int flags=0)

◆ ~QDBusDemarshaller()

QDBusDemarshaller::~QDBusDemarshaller ( )

Definition at line 75 of file qdbusdemarshaller.cpp.

76 {
77 }

Functions

◆ atEnd()

bool QDBusDemarshaller::atEnd ( )

Definition at line 362 of file qdbusdemarshaller.cpp.

Referenced by QDBusMarshaller::appendCrossMarshalling(), QDBusArgument::atEnd(), QDBusMessagePrivate::fromDBusMessage(), and toStringListUnchecked().

363 {
364  // dbus_message_iter_has_next is broken if the list has one single element
365  return q_dbus_message_iter_get_arg_type(&iterator) == DBUS_TYPE_INVALID;
366 }
DBusMessageIter iterator

◆ beginArray()

QDBusDemarshaller * QDBusDemarshaller::beginArray ( )
inline

Definition at line 373 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::beginArray().

374 {
375  return beginCommon();
376 }
QDBusDemarshaller * beginCommon()

◆ beginCommon()

QDBusDemarshaller * QDBusDemarshaller::beginCommon ( )

Definition at line 388 of file qdbusdemarshaller.cpp.

Referenced by QDBusMarshaller::appendCrossMarshalling(), beginArray(), beginMap(), beginMapEntry(), and beginStructure().

389 {
391  d->parent = this;
392  d->message = q_dbus_message_ref(message);
393 
394  // recurse
395  q_dbus_message_iter_recurse(&iterator, &d->iterator);
396  q_dbus_message_iter_next(&iterator);
397  return d;
398 }
DBusMessage * message
static QDBusArgumentPrivate * d(QDBusArgument &q)
QDBusDemarshaller * parent
DBusMessageIter iterator
QDBusDemarshaller(int flags)

◆ beginMap()

QDBusDemarshaller * QDBusDemarshaller::beginMap ( )
inline

Definition at line 378 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::beginMap().

379 {
380  return beginCommon();
381 }
QDBusDemarshaller * beginCommon()

◆ beginMapEntry()

QDBusDemarshaller * QDBusDemarshaller::beginMapEntry ( )
inline

Definition at line 383 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::beginMapEntry().

384 {
385  return beginCommon();
386 }
QDBusDemarshaller * beginCommon()

◆ beginStructure()

QDBusDemarshaller * QDBusDemarshaller::beginStructure ( )
inline

Definition at line 368 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::beginStructure().

369 {
370  return beginCommon();
371 }
QDBusDemarshaller * beginCommon()

◆ close()

void QDBusDemarshaller::close ( )
inline

Definition at line 198 of file qdbusargument_p.h.

198 { }

◆ currentSignature()

QString QDBusDemarshaller::currentSignature ( )
inline

Definition at line 79 of file qdbusdemarshaller.cpp.

Referenced by QDBusMarshaller::appendCrossMarshalling(), and QDBusArgument::currentSignature().

80 {
81  char *sig = q_dbus_message_iter_get_signature(&iterator);
82  QString retval = QString::fromUtf8(sig);
83  q_dbus_free(sig);
84 
85  return retval;
86 }
The QString class provides a Unicode character string.
Definition: qstring.h:83
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
DBusMessageIter iterator

◆ currentType()

QDBusArgument::ElementType QDBusDemarshaller::currentType ( )

Definition at line 189 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::currentType().

190 {
191  switch (q_dbus_message_iter_get_arg_type(&iterator)) {
192  case DBUS_TYPE_BYTE:
193  case DBUS_TYPE_INT16:
194  case DBUS_TYPE_UINT16:
195  case DBUS_TYPE_INT32:
196  case DBUS_TYPE_UINT32:
197  case DBUS_TYPE_INT64:
198  case DBUS_TYPE_UINT64:
199  case DBUS_TYPE_BOOLEAN:
200  case DBUS_TYPE_DOUBLE:
201  case DBUS_TYPE_STRING:
202  case DBUS_TYPE_OBJECT_PATH:
203  case DBUS_TYPE_SIGNATURE:
205 
206  case DBUS_TYPE_VARIANT:
208 
209  case DBUS_TYPE_ARRAY:
210  switch (q_dbus_message_iter_get_element_type(&iterator)) {
211  case DBUS_TYPE_BYTE:
212  case DBUS_TYPE_STRING:
213  // QByteArray and QStringList
215  case DBUS_TYPE_DICT_ENTRY:
216  return QDBusArgument::MapType;
217  default:
219  }
220 
221  case DBUS_TYPE_STRUCT:
223  case DBUS_TYPE_DICT_ENTRY:
225 
226  case DBUS_TYPE_UNIX_FD:
229 
230  case DBUS_TYPE_INVALID:
232 
233 // default:
234 // qWarning("QDBusDemarshaller: Found unknown D-Bus type %d '%c'",
235 // q_dbus_message_iter_get_arg_type(&iterator),
236 // q_dbus_message_iter_get_arg_type(&iterator));
237  }
239 }
#define DBUS_TYPE_UNIX_FD
DBusMessageIter iterator

◆ duplicate()

QDBusArgument QDBusDemarshaller::duplicate ( )

Definition at line 427 of file qdbusdemarshaller.cpp.

Referenced by toVariantInternal().

428 {
430  d->iterator = iterator;
431  d->message = q_dbus_message_ref(message);
432 
433  q_dbus_message_iter_next(&iterator);
435 }
DBusMessage * message
static QDBusArgumentPrivate * d(QDBusArgument &q)
static QDBusArgument create(QDBusArgumentPrivate *d)
DBusMessageIter iterator
QDBusDemarshaller(int flags)

◆ endArray()

QDBusDemarshaller * QDBusDemarshaller::endArray ( )
inline

Definition at line 405 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::endArray().

406 {
407  return endCommon();
408 }
QDBusDemarshaller * endCommon()

◆ endCommon()

QDBusDemarshaller * QDBusDemarshaller::endCommon ( )

Definition at line 420 of file qdbusdemarshaller.cpp.

Referenced by endArray(), endMap(), endMapEntry(), and endStructure().

421 {
422  QDBusDemarshaller *retval = parent;
423  delete this;
424  return retval;
425 }
QDBusDemarshaller * parent

◆ endMap()

QDBusDemarshaller * QDBusDemarshaller::endMap ( )
inline

Definition at line 410 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::endMap().

411 {
412  return endCommon();
413 }
QDBusDemarshaller * endCommon()

◆ endMapEntry()

QDBusDemarshaller * QDBusDemarshaller::endMapEntry ( )
inline

Definition at line 415 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::endMapEntry().

416 {
417  return endCommon();
418 }
QDBusDemarshaller * endCommon()

◆ endStructure()

QDBusDemarshaller * QDBusDemarshaller::endStructure ( )
inline

Definition at line 400 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::endStructure().

401 {
402  return endCommon();
403 }
QDBusDemarshaller * endCommon()

◆ isCurrentTypeStringLike()

bool QDBusDemarshaller::isCurrentTypeStringLike ( )

Definition at line 307 of file qdbusdemarshaller.cpp.

Referenced by toObjectPath(), toSignature(), and toString().

308 {
309  const int type = q_dbus_message_iter_get_arg_type(&iterator);
310  switch (type) {
311  case DBUS_TYPE_STRING: //FALLTHROUGH
312  case DBUS_TYPE_OBJECT_PATH: //FALLTHROUGH
313  case DBUS_TYPE_SIGNATURE:
314  return true;
315  default:
316  return false;
317  }
318 }
int type
Definition: qmetatype.cpp:239
DBusMessageIter iterator

◆ toBool()

bool QDBusDemarshaller::toBool ( )
inline

Definition at line 93 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

94 {
95  return bool(qIterGet<dbus_bool_t>(&iterator));
96 }
DBusMessageIter iterator

◆ toByte()

uchar QDBusDemarshaller::toByte ( )
inline

Definition at line 88 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

89 {
90  return qIterGet<uchar>(&iterator);
91 }
DBusMessageIter iterator

◆ toByteArray()

QByteArray QDBusDemarshaller::toByteArray ( )

Definition at line 353 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>().

354 {
355  if (q_dbus_message_iter_get_arg_type(&iterator) == DBUS_TYPE_ARRAY
356  && q_dbus_message_iter_get_element_type(&iterator) == DBUS_TYPE_BYTE) {
357  return toByteArrayUnchecked();
358  }
359  return QByteArray();
360 }
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
QByteArray toByteArrayUnchecked()
DBusMessageIter iterator

◆ toByteArrayUnchecked()

QByteArray QDBusDemarshaller::toByteArrayUnchecked ( )
private

Definition at line 342 of file qdbusdemarshaller.cpp.

Referenced by toByteArray(), and toVariantInternal().

343 {
344  DBusMessageIter sub;
345  q_dbus_message_iter_recurse(&iterator, &sub);
346  q_dbus_message_iter_next(&iterator);
347  int len;
348  char* data;
349  q_dbus_message_iter_get_fixed_array(&sub,&data,&len);
350  return QByteArray(data,len);
351 }
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
static const char * data(const QByteArray &arr)
DBusMessageIter iterator

◆ toDouble()

double QDBusDemarshaller::toDouble ( )
inline

Definition at line 128 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

129 {
130  return qIterGet<double>(&iterator);
131 }
DBusMessageIter iterator

◆ toInt()

int QDBusDemarshaller::toInt ( )
inline

Definition at line 108 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

109 {
110  return qIterGet<dbus_int32_t>(&iterator);
111 }
DBusMessageIter iterator

◆ toLongLong()

qlonglong QDBusDemarshaller::toLongLong ( )
inline

Definition at line 118 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

119 {
120  return qIterGet<qlonglong>(&iterator);
121 }
DBusMessageIter iterator

◆ toObjectPath()

QDBusObjectPath QDBusDemarshaller::toObjectPath ( )
inline

Definition at line 151 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>().

152 {
154  return toObjectPathUnchecked();
155  else
156  return QDBusObjectPath();
157 }
QDBusObjectPath toObjectPathUnchecked()
The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-B...

◆ toObjectPathUnchecked()

QDBusObjectPath QDBusDemarshaller::toObjectPathUnchecked ( )
inlineprivate

Definition at line 146 of file qdbusdemarshaller.cpp.

Referenced by toObjectPath(), and toVariantInternal().

147  {
148  return QDBusObjectPath(QString::fromUtf8(qIterGet<char *>(&iterator)));
149  }
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
DBusMessageIter iterator
The QDBusObjectPath class enables the programmer to identify the OBJECT_PATH type provided by the D-B...

◆ toShort()

short QDBusDemarshaller::toShort ( )
inline

Definition at line 103 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

104 {
105  return qIterGet<dbus_int16_t>(&iterator);
106 }
DBusMessageIter iterator

◆ toSignature()

QDBusSignature QDBusDemarshaller::toSignature ( )
inline

Definition at line 164 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>().

165 {
167  return toSignatureUnchecked();
168  else
169  return QDBusSignature();
170 }
QDBusSignature toSignatureUnchecked()
The QDBusSignature class enables the programmer to identify the SIGNATURE type provided by the D-Bus ...

◆ toSignatureUnchecked()

QDBusSignature QDBusDemarshaller::toSignatureUnchecked ( )
inlineprivate

Definition at line 159 of file qdbusdemarshaller.cpp.

Referenced by toSignature(), and toVariantInternal().

160  {
161  return QDBusSignature(QString::fromUtf8(qIterGet<char *>(&iterator)));
162  }
The QDBusSignature class enables the programmer to identify the SIGNATURE type provided by the D-Bus ...
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
DBusMessageIter iterator

◆ toString()

QString QDBusDemarshaller::toString ( )
inline

Definition at line 138 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>().

139 {
141  return toStringUnchecked();
142  else
143  return QString();
144 }
The QString class provides a Unicode character string.
Definition: qstring.h:83

◆ toStringList()

QStringList QDBusDemarshaller::toStringList ( )

Definition at line 333 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>().

334 {
335  if (q_dbus_message_iter_get_arg_type(&iterator) == DBUS_TYPE_ARRAY
336  && q_dbus_message_iter_get_element_type(&iterator) == DBUS_TYPE_STRING)
337  return toStringListUnchecked();
338  else
339  return QStringList();
340 }
QStringList toStringListUnchecked()
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
DBusMessageIter iterator

◆ toStringListUnchecked()

QStringList QDBusDemarshaller::toStringListUnchecked ( )
private

Definition at line 320 of file qdbusdemarshaller.cpp.

Referenced by toStringList(), and toVariantInternal().

321 {
322  QStringList list;
323 
325  q_dbus_message_iter_recurse(&iterator, &sub.iterator);
326  q_dbus_message_iter_next(&iterator);
327  while (!sub.atEnd())
328  list.append(sub.toStringUnchecked());
329 
330  return list;
331 }
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
DBusMessageIter iterator

◆ toStringUnchecked()

QString QDBusDemarshaller::toStringUnchecked ( )
inlineprivate

Definition at line 133 of file qdbusdemarshaller.cpp.

Referenced by toString(), toStringListUnchecked(), and toVariantInternal().

134 {
135  return QString::fromUtf8(qIterGet<char *>(&iterator));
136 }
static QString fromUtf8(const char *, int size=-1)
Returns a QString initialized with the first size bytes of the UTF-8 string str.
Definition: qstring.cpp:4302
DBusMessageIter iterator

◆ toUInt()

uint QDBusDemarshaller::toUInt ( )
inline

Definition at line 113 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

114 {
115  return qIterGet<dbus_uint32_t>(&iterator);
116 }
DBusMessageIter iterator

◆ toULongLong()

qulonglong QDBusDemarshaller::toULongLong ( )
inline

Definition at line 123 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

124 {
125  return qIterGet<qulonglong>(&iterator);
126 }
DBusMessageIter iterator

◆ toUnixFileDescriptor()

QDBusUnixFileDescriptor QDBusDemarshaller::toUnixFileDescriptor ( )
inline

Definition at line 172 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

173 {
175  fd.giveFileDescriptor(qIterGet<dbus_int32_t>(&iterator));
176  return fd;
177 }
The QDBusUnixFileDescriptor class holds one Unix file descriptor.
DBusMessageIter iterator
void giveFileDescriptor(int fileDescriptor)
Sets the Unix file descriptor to fileDescriptor without copying.

◆ toUShort()

ushort QDBusDemarshaller::toUShort ( )
inline

Definition at line 98 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

99 {
100  return qIterGet<dbus_uint16_t>(&iterator);
101 }
DBusMessageIter iterator

◆ toVariant()

QDBusVariant QDBusDemarshaller::toVariant ( )
inline

Definition at line 179 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::operator>>(), and toVariantInternal().

180 {
182  sub.message = q_dbus_message_ref(message);
183  q_dbus_message_iter_recurse(&iterator, &sub.iterator);
184  q_dbus_message_iter_next(&iterator);
185 
186  return QDBusVariant( sub.toVariantInternal() );
187 }
DBusMessage * message
DBusMessageIter iterator
The QDBusVariant class enables the programmer to identify the variant type provided by the D-Bus type...

◆ toVariantInternal()

QVariant QDBusDemarshaller::toVariantInternal ( )

Definition at line 241 of file qdbusdemarshaller.cpp.

Referenced by QDBusArgument::asVariant(), QDBusMessagePrivate::fromDBusMessage(), and toVariant().

242 {
243  switch (q_dbus_message_iter_get_arg_type(&iterator)) {
244  case DBUS_TYPE_BYTE:
245  return QVariant::fromValue(toByte());
246  case DBUS_TYPE_INT16:
247  return QVariant::fromValue(toShort());
248  case DBUS_TYPE_UINT16:
249  return QVariant::fromValue(toUShort());
250  case DBUS_TYPE_INT32:
251  return toInt();
252  case DBUS_TYPE_UINT32:
253  return toUInt();
254  case DBUS_TYPE_DOUBLE:
255  return toDouble();
256  case DBUS_TYPE_BOOLEAN:
257  return toBool();
258  case DBUS_TYPE_INT64:
259  return toLongLong();
260  case DBUS_TYPE_UINT64:
261  return toULongLong();
262  case DBUS_TYPE_STRING:
263  return toStringUnchecked();
264  case DBUS_TYPE_OBJECT_PATH:
266  case DBUS_TYPE_SIGNATURE:
268  case DBUS_TYPE_VARIANT:
269  return QVariant::fromValue(toVariant());
270 
271  case DBUS_TYPE_ARRAY:
272  switch (q_dbus_message_iter_get_element_type(&iterator)) {
273  case DBUS_TYPE_BYTE:
274  // QByteArray
275  return toByteArrayUnchecked();
276  case DBUS_TYPE_STRING:
277  return toStringListUnchecked();
278  case DBUS_TYPE_DICT_ENTRY:
279  return QVariant::fromValue(duplicate());
280 
281  default:
282  return QVariant::fromValue(duplicate());
283  }
284 
285  case DBUS_TYPE_STRUCT:
286  return QVariant::fromValue(duplicate());
287 
288  case DBUS_TYPE_UNIX_FD:
291  // fall through
292 
293  default:
294 // qWarning("QDBusDemarshaller: Found unknown D-Bus type %d '%c'",
295 // q_dbus_message_iter_get_arg_type(&iterator),
296 // q_dbus_message_iter_get_arg_type(&iterator));
297  char *ptr = 0;
298  ptr += q_dbus_message_iter_get_arg_type(&iterator);
299  q_dbus_message_iter_next(&iterator);
300 
301  // I hope you never dereference this pointer!
302  return QVariant::fromValue<void *>(ptr);
303  break;
304  };
305 }
QDBusSignature toSignatureUnchecked()
QStringList toStringListUnchecked()
QVariant qVariantFromValue(const T &)
Definition: qvariant.h:451
#define DBUS_TYPE_UNIX_FD
QDBusObjectPath toObjectPathUnchecked()
QDBusArgument duplicate()
QByteArray toByteArrayUnchecked()
const T * ptr(const T &t)
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
Definition: qvariant.h:336
QDBusVariant toVariant()
DBusMessageIter iterator
QDBusUnixFileDescriptor toUnixFileDescriptor()

Properties

◆ iterator

DBusMessageIter QDBusDemarshaller::iterator

◆ parent

QDBusDemarshaller* QDBusDemarshaller::parent

Definition at line 208 of file qdbusargument_p.h.

Referenced by beginCommon(), and endCommon().


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