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

Public Functions

bool contains (int index)
 
QString createField (int index, const QString &prefix) const
 
 QSqlRecordPrivate ()
 
 QSqlRecordPrivate (const QSqlRecordPrivate &other)
 

Public Variables

QVector< QSqlFieldfields
 
QAtomicInt ref
 

Detailed Description

Definition at line 53 of file qsqlrecord.cpp.

Constructors and Destructors

◆ QSqlRecordPrivate() [1/2]

QSqlRecordPrivate::QSqlRecordPrivate ( )

Definition at line 66 of file qsqlrecord.cpp.

Referenced by QSqlRecord::QSqlRecord().

67 {
68  ref = 1;
69 }
QAtomicInt ref
Definition: qsqlrecord.cpp:63

◆ QSqlRecordPrivate() [2/2]

QSqlRecordPrivate::QSqlRecordPrivate ( const QSqlRecordPrivate other)

Definition at line 71 of file qsqlrecord.cpp.

71  : fields(other.fields)
72 {
73  ref = 1;
74 }
QVector< QSqlField > fields
Definition: qsqlrecord.cpp:62
QAtomicInt ref
Definition: qsqlrecord.cpp:63

Functions

◆ contains()

bool QSqlRecordPrivate::contains ( int  index)
inline

Definition at line 59 of file qsqlrecord.cpp.

59 { return index >= 0 && index < fields.count(); }
int count(const T &t) const
Returns the number of occurrences of value in the vector.
Definition: qvector.h:742
QVector< QSqlField > fields
Definition: qsqlrecord.cpp:62
quint16 index

◆ createField()

QString QSqlRecordPrivate::createField ( int  index,
const QString prefix 
) const
Warning
This function is not part of the public interface. Just for compat

Definition at line 79 of file qsqlrecord.cpp.

Referenced by contains().

80 {
81  QString f;
82  if (!prefix.isEmpty())
83  f = prefix + QLatin1Char('.');
84  f += fields.at(index).name();
85  return f;
86 }
The QString class provides a Unicode character string.
Definition: qstring.h:83
QVector< QSqlField > fields
Definition: qsqlrecord.cpp:62
QString name() const
Returns the name of the field.
Definition: qsqlfield.cpp:380
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
quint16 index
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55

Properties

◆ fields

QVector<QSqlField> QSqlRecordPrivate::fields

Definition at line 62 of file qsqlrecord.cpp.

Referenced by contains(), createField(), and QSqlRecord::operator==().

◆ ref

QAtomicInt QSqlRecordPrivate::ref

Definition at line 63 of file qsqlrecord.cpp.

Referenced by QSqlRecordPrivate().


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