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

#include <qtestelement.h>

Inheritance diagram for QTestElement:
QTestCoreElement< QTestElement > QTestCoreList< QTestElement >

Public Functions

bool addLogElement (QTestElement *element)
 
QTestElementchildElements () const
 
const QTestElementparentElement () const
 
 QTestElement (int type=-1)
 
void setParent (const QTestElement *p)
 
 ~QTestElement ()
 
- Public Functions inherited from QTestCoreElement< QTestElement >
void addAttribute (const QTest::AttributeIndex index, const char *value)
 
const QTestElementAttributeattribute (QTest::AttributeIndex index) const
 
const char * attributeName (QTest::AttributeIndex index) const
 
QTestElementAttributeattributes () const
 
const char * attributeValue (QTest::AttributeIndex index) const
 
const char * elementName () const
 
QTest::LogElementType elementType () const
 
 QTestCoreElement (int type=-1)
 
virtual ~QTestCoreElement ()
 
- Public Functions inherited from QTestCoreList< QTestElement >
void addToList (QTestElement **list)
 
int count (QTestElement *list)
 
int count ()
 
QTestElementnextElement ()
 
QTestElementpreviousElement ()
 
 QTestCoreList ()
 
virtual ~QTestCoreList ()
 

Properties

QTestElementlistOfChildren
 
const QTestElementparent
 

Detailed Description

Definition at line 53 of file qtestelement.h.

Constructors and Destructors

◆ QTestElement()

QTestElement::QTestElement ( int  type = -1)

Definition at line 46 of file qtestelement.cpp.

48  listOfChildren(0),
49  parent(0)
50 {
51 }
const QTestElement * parent
Definition: qtestelement.h:67
QTestElement * listOfChildren
Definition: qtestelement.h:66

◆ ~QTestElement()

QTestElement::~QTestElement ( )

Definition at line 53 of file qtestelement.cpp.

54 {
55  delete listOfChildren;
56 }
QTestElement * listOfChildren
Definition: qtestelement.h:66

Functions

◆ addLogElement()

bool QTestElement::addLogElement ( QTestElement element)

Definition at line 58 of file qtestelement.cpp.

Referenced by QTestLogger::addBenchmarkResult(), QTestLogger::addIncident(), QTestLogger::addMessage(), and QTestLogger::stopLogging().

59 {
60  if(!element)
61  return false;
62 
63  if(element->elementType() != QTest::LET_Undefined){
64  element->addToList(&listOfChildren);
65  element->setParent(this);
66  return true;
67  }
68 
69  return false;
70 }
void setParent(const QTestElement *p)
QTestElement * listOfChildren
Definition: qtestelement.h:66
void addToList(T **list)
Definition: qtestcorelist.h:93
QTest::LogElementType elementType() const

◆ childElements()

QTestElement * QTestElement::childElements ( ) const

◆ parentElement()

const QTestElement * QTestElement::parentElement ( ) const

◆ setParent()

void QTestElement::setParent ( const QTestElement p)

Definition at line 82 of file qtestelement.cpp.

Referenced by addLogElement(), and QTestLogger::stopLogging().

83 {
84  parent = p;
85 }
const QTestElement * parent
Definition: qtestelement.h:67

Properties

◆ listOfChildren

QTestElement* QTestElement::listOfChildren
private

Definition at line 66 of file qtestelement.h.

Referenced by addLogElement(), childElements(), and ~QTestElement().

◆ parent

const QTestElement* QTestElement::parent
private

Definition at line 67 of file qtestelement.h.

Referenced by parentElement(), and setParent().


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