Qt 4.8
Public Functions | Properties | List of all members
QTestElementAttribute Class Reference

#include <qtestelementattribute.h>

Inheritance diagram for QTestElementAttribute:
QTestCoreList< QTestElementAttribute >

Public Functions

QTest::AttributeIndex index () const
 
bool isNull () const
 
const char * name () const
 
 QTestElementAttribute ()
 
bool setPair (QTest::AttributeIndex attributeIndex, const char *value)
 
const char * value () const
 
 ~QTestElementAttribute ()
 
- Public Functions inherited from QTestCoreList< QTestElementAttribute >
void addToList (QTestElementAttribute **list)
 
int count (QTestElementAttribute *list)
 
int count ()
 
QTestElementAttributenextElement ()
 
QTestElementAttributepreviousElement ()
 
 QTestCoreList ()
 
virtual ~QTestCoreList ()
 

Properties

QTest::AttributeIndex attributeIndex
 
char * attributeValue
 

Detailed Description

Definition at line 90 of file qtestelementattribute.h.

Constructors and Destructors

◆ QTestElementAttribute()

QTestElementAttribute::QTestElementAttribute ( )

◆ ~QTestElementAttribute()

QTestElementAttribute::~QTestElementAttribute ( )

Definition at line 121 of file qtestelementattribute.cpp.

122 {
123  delete[] attributeValue;
124 }

Functions

◆ index()

QTest::AttributeIndex QTestElementAttribute::index ( ) const

Definition at line 159 of file qtestelementattribute.cpp.

Referenced by QTestCoreElement< QTestElement >::attribute(), QTestXunitStreamer::formatAttributes(), and setPair().

160 {
161  return attributeIndex;
162 }
QTest::AttributeIndex attributeIndex

◆ isNull()

bool QTestElementAttribute::isNull ( ) const

Definition at line 164 of file qtestelementattribute.cpp.

165 {
167 }
QTest::AttributeIndex attributeIndex

◆ name()

const char * QTestElementAttribute::name ( ) const

Definition at line 131 of file qtestelementattribute.cpp.

Referenced by QTestCoreElement< QTestElement >::attributeName(), and QTestXunitStreamer::formatAttributes().

132 {
133  const char *AttributeNames[] =
134  {
135  "name",
136  "result",
137  "tests",
138  "failures",
139  "errors",
140  "type",
141  "description",
142  "value",
143  "qtestversion",
144  "qtversion",
145  "file",
146  "line",
147  "metric",
148  "tag",
149  "value",
150  "iterations"
151  };
152 
154  return AttributeNames[attributeIndex];
155 
156  return 0;
157 }
QTest::AttributeIndex attributeIndex

◆ setPair()

bool QTestElementAttribute::setPair ( QTest::AttributeIndex  attributeIndex,
const char *  value 
)

Definition at line 169 of file qtestelementattribute.cpp.

Referenced by QTestCoreElement< QTestElement >::addAttribute(), and QTestLogger::addIncident().

170 {
171  if(!value)
172  return false;
173 
174  delete[] attributeValue;
175 
178 
179  return (attributeValue!=0) ? true:false;
180 }
const char * value() const
Q_CORE_EXPORT char * qstrdup(const char *)
QTest::AttributeIndex attributeIndex
QTest::AttributeIndex index() const

◆ value()

const char * QTestElementAttribute::value ( ) const

Properties

◆ attributeIndex

QTest::AttributeIndex QTestElementAttribute::attributeIndex
private

Definition at line 104 of file qtestelementattribute.h.

Referenced by index(), isNull(), name(), and setPair().

◆ attributeValue

char* QTestElementAttribute::attributeValue
private

Definition at line 103 of file qtestelementattribute.h.

Referenced by setPair(), value(), and ~QTestElementAttribute().


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