Qt 4.8
Public Types | Public Functions | Public Variables | List of all members
QProcessPrivate::Channel Struct Reference

#include <qprocess_p.h>

Public Types

enum  ProcessChannelType { Normal = 0, PipeSource = 1, PipeSink = 2, Redirect = 3 }
 

Public Functions

 Channel ()
 
void clear ()
 
Channeloperator= (const QString &fileName)
 
void pipeFrom (QProcessPrivate *other)
 
void pipeTo (QProcessPrivate *other)
 

Public Variables

bool append: 1
 
bool closed: 1
 
QString file
 
QSocketNotifiernotifier
 
Q_PIPE pipe [2]
 
QProcessPrivateprocess
 
unsigned type: 2
 

Detailed Description

Definition at line 245 of file qprocess_p.h.

Enumerations

◆ ProcessChannelType

Enumerator
Normal 
PipeSource 
PipeSink 
Redirect 

Definition at line 246 of file qprocess_p.h.

246  {
247  Normal = 0,
248  PipeSource = 1,
249  PipeSink = 2,
250  Redirect = 3
251  // if you add "= 4" here, increase the number of bits below
252  };

Constructors and Destructors

◆ Channel()

QProcessPrivate::Channel::Channel ( )
inline

Definition at line 254 of file qprocess_p.h.

254  : process(0), notifier(0), type(Normal), closed(false), append(false)
255  {
256  pipe[0] = INVALID_Q_PIPE;
257  pipe[1] = INVALID_Q_PIPE;
258  }
#define INVALID_Q_PIPE
Definition: qprocess_p.h:69
QSocketNotifier * notifier
Definition: qprocess_p.h:286
QProcessPrivate * process
Definition: qprocess_p.h:285

Functions

◆ clear()

void QProcessPrivate::Channel::clear ( )

Definition at line 445 of file qprocess.cpp.

446 {
447  switch (type) {
448  case PipeSource:
449  Q_ASSERT(process);
452  break;
453  case PipeSink:
454  Q_ASSERT(process);
457  break;
458  }
459 
460  type = Normal;
461  file.clear();
462  process = 0;
463 }
Channel stdinChannel
Definition: qprocess_p.h:317
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
Channel stdoutChannel
Definition: qprocess_p.h:318
QProcessPrivate * process
Definition: qprocess_p.h:285
void clear()
Clears the contents of the string and makes it empty.
Definition: qstring.h:723

◆ operator=()

Channel& QProcessPrivate::Channel::operator= ( const QString fileName)
inline

Definition at line 262 of file qprocess_p.h.

263  {
264  clear();
265  file = fileName;
266  type = fileName.isEmpty() ? Normal : Redirect;
267  return *this;
268  }
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
static QString fileName(const QString &fileUrl)

◆ pipeFrom()

void QProcessPrivate::Channel::pipeFrom ( QProcessPrivate other)
inline

Definition at line 277 of file qprocess_p.h.

Referenced by QProcess::setStandardOutputProcess().

278  {
279  clear();
280  process = other;
281  type = PipeSink;
282  }
QProcessPrivate * process
Definition: qprocess_p.h:285

◆ pipeTo()

void QProcessPrivate::Channel::pipeTo ( QProcessPrivate other)
inline

Definition at line 270 of file qprocess_p.h.

Referenced by QProcess::setStandardOutputProcess().

271  {
272  clear();
273  process = other;
274  type = PipeSource;
275  }
QProcessPrivate * process
Definition: qprocess_p.h:285

Properties

◆ append

bool QProcessPrivate::Channel::append

Definition at line 291 of file qprocess_p.h.

Referenced by QProcessPrivate::createChannel().

◆ closed

bool QProcessPrivate::Channel::closed

Definition at line 290 of file qprocess_p.h.

◆ file

QString QProcessPrivate::Channel::file

Definition at line 284 of file qprocess_p.h.

Referenced by QProcessPrivate::createChannel().

◆ notifier

QSocketNotifier* QProcessPrivate::Channel::notifier

Definition at line 286 of file qprocess_p.h.

Referenced by QProcessPrivate::createChannel().

◆ pipe

Q_PIPE QProcessPrivate::Channel::pipe[2]

◆ process

QProcessPrivate* QProcessPrivate::Channel::process

Definition at line 285 of file qprocess_p.h.

Referenced by QProcessPrivate::createChannel().

◆ type

unsigned QProcessPrivate::Channel::type

Definition at line 289 of file qprocess_p.h.

Referenced by QProcessPrivate::createChannel().


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