Qt 4.8
Classes | Public Functions | Public Variables | Static Public Variables | List of all members
QTestTablePrivate Class Reference

Classes

struct  DataList
 
struct  ElementList
 

Public Functions

void append (int elemType, const char *elemName)
 
void append (QTestData *data)
 
QTestDatadataAt (int index)
 
ElementListelementAt (int index)
 
 QTestTablePrivate ()
 
 ~QTestTablePrivate ()
 

Public Variables

DataListdataList
 
ElementListlist
 

Static Public Variables

static QTestTablecurrentTestTable = 0
 
static QTestTablegTable = 0
 

Detailed Description

Definition at line 53 of file qtesttable.cpp.

Constructors and Destructors

◆ QTestTablePrivate()

QTestTablePrivate::QTestTablePrivate ( )
inline

Definition at line 71 of file qtesttable.cpp.

Referenced by QTestTable::QTestTable().

71 : list(0), dataList(0) {}
DataList * dataList
Definition: qtesttable.cpp:75
ElementList * list
Definition: qtesttable.cpp:74

◆ ~QTestTablePrivate()

QTestTablePrivate::~QTestTablePrivate ( )

Definition at line 111 of file qtesttable.cpp.

Referenced by QTestTablePrivate().

112 {
113  DataList *dit = dataList;
114  while (dit) {
115  DataList *next = dit->next;
116  delete dit->data;
117  delete dit;
118  dit = next;
119  }
120  ElementList *iter = list;
121  while (iter) {
122  ElementList *next = iter->next;
123  delete iter;
124  iter = next;
125  }
126 }
DataList * dataList
Definition: qtesttable.cpp:75
ElementList * list
Definition: qtesttable.cpp:74

Functions

◆ append() [1/2]

void QTestTablePrivate::append ( int  elemType,
const char *  elemName 
)

Definition at line 128 of file qtesttable.cpp.

129 {
130  ElementList *item = new ElementList;
131  item->elementName = elemName;
132  item->elementType = elemType;
133  if (!list) {
134  list = item;
135  return;
136  }
137  ElementList *last = list;
138  while (last->next != 0)
139  last = last->next;
140  last->next = item;
141 }
ElementList * list
Definition: qtesttable.cpp:74

◆ append() [2/2]

void QTestTablePrivate::append ( QTestData data)

Definition at line 143 of file qtesttable.cpp.

144 {
145  DataList *item = new DataList;
146  item->data = data;
147  if (!dataList) {
148  dataList = item;
149  return;
150  }
151  DataList *last = dataList;
152  while (last->next != 0)
153  last = last->next;
154  last->next = item;
155 }
static const char * data(const QByteArray &arr)
DataList * dataList
Definition: qtesttable.cpp:75

◆ dataAt()

QTestData * QTestTablePrivate::dataAt ( int  index)

Definition at line 100 of file qtesttable.cpp.

101 {
102  DataList *iter = dataList;
103  for (int i = 0; i < index; ++i) {
104  if (!iter)
105  return 0;
106  iter = iter->next;
107  }
108  return iter ? iter->data : 0;
109 }
DataList * dataList
Definition: qtesttable.cpp:75
quint16 index

◆ elementAt()

QTestTablePrivate::ElementList * QTestTablePrivate::elementAt ( int  index)

Definition at line 89 of file qtesttable.cpp.

90 {
91  ElementList *iter = list;
92  for (int i = 0; i < index; ++i) {
93  if (!iter)
94  return 0;
95  iter = iter->next;
96  }
97  return iter;
98 }
ElementList * list
Definition: qtesttable.cpp:74
quint16 index

Properties

◆ currentTestTable

QTestTable * QTestTablePrivate::currentTestTable = 0
static

Definition at line 82 of file qtesttable.cpp.

Referenced by QTestTable::currentTestTable().

◆ dataList

DataList* QTestTablePrivate::dataList

Definition at line 75 of file qtesttable.cpp.

Referenced by append(), dataAt(), and ~QTestTablePrivate().

◆ gTable

QTestTable * QTestTablePrivate::gTable = 0
static

Definition at line 83 of file qtesttable.cpp.

Referenced by QTestTable::clearGlobalTestTable(), and QTestTable::globalTestTable().

◆ list

ElementList* QTestTablePrivate::list

Definition at line 74 of file qtesttable.cpp.

Referenced by append(), elementAt(), and ~QTestTablePrivate().


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