QFtpCommand Class Reference

Collaboration diagram for QFtpCommand:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 209 of file qftp.cpp.

Public Member Functions

 QFtpCommand (QFtp::Command cmd, QStringList raw, const QByteArray &ba)
 QFtpCommand (QFtp::Command cmd, QStringList raw, QIODevice *dev=0)
 ~QFtpCommand ()

Static Public Member Functions

static int nextId ()

Public Attributes

int id
QFtp::Command command
QStringList rawCmds
union {
   QByteArray *   ba
   QIODevice *   dev
data
bool is_ba

Static Public Attributes

static QBasicAtomic idCounter


Constructor & Destructor Documentation

QFtpCommand::QFtpCommand ( QFtp::Command  cmd,
QStringList  raw,
const QByteArray ba 
)

Definition at line 244 of file qftp.cpp.

References ba, data, and nextId().

00245     : command(cmd), rawCmds(raw), is_ba(true)
00246 {
00247     id = nextId();
00248     data.ba = new QByteArray(ba);
00249 }

Here is the call graph for this function:

QFtpCommand::QFtpCommand ( QFtp::Command  cmd,
QStringList  raw,
QIODevice dev = 0 
)

Definition at line 251 of file qftp.cpp.

References data, dev, and nextId().

00252     : command(cmd), rawCmds(raw), is_ba(false)
00253 {
00254     id = nextId();
00255     data.dev = dev;
00256 }

Here is the call graph for this function:

QFtpCommand::~QFtpCommand (  ) 

Definition at line 258 of file qftp.cpp.

References data, and is_ba.

00259 {
00260     if (is_ba)
00261         delete data.ba;
00262 }


Member Function Documentation

int QFtpCommand::nextId (  )  [static]

Definition at line 233 of file qftp.cpp.

References id, idCounter, and QBasicAtomic::testAndSet().

Referenced by QFtpCommand().

00234 {
00235     register int id;
00236     for (;;) {
00237         id = idCounter;
00238         if (idCounter.testAndSet(id, id + 1))
00239             break;
00240     }
00241     return id;
00242 }

Here is the call graph for this function:


Member Data Documentation

int QFtpCommand::id

Definition at line 216 of file qftp.cpp.

Referenced by QFtpPrivate::addCommand(), and nextId().

QFtp::Command QFtpCommand::command

Definition at line 217 of file qftp.cpp.

QStringList QFtpCommand::rawCmds

Definition at line 218 of file qftp.cpp.

QByteArray* QFtpCommand::ba

Definition at line 223 of file qftp.cpp.

Referenced by QFtpCommand().

QIODevice* QFtpCommand::dev

Definition at line 224 of file qftp.cpp.

Referenced by QFtpCommand().

union { ... } QFtpCommand::data

Referenced by QFtpCommand(), and ~QFtpCommand().

bool QFtpCommand::is_ba

Definition at line 226 of file qftp.cpp.

Referenced by ~QFtpCommand().

QBasicAtomic QFtpCommand::idCounter [static]

Definition at line 228 of file qftp.cpp.

Referenced by nextId().


The documentation for this class was generated from the following file:
Generated on Thu Mar 15 17:43:29 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1