WvStreams
Main Page
Modules
Classes
Files
File List
File Members
include
wvsubprocqueue.h
1
/* -*- Mode: C++ -*-
2
* Worldvisions Weaver Software:
3
* Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4
*
5
* A class for running a series or set of processes, one at a time.
6
*/
7
#ifndef __WVSUBPROCQUEUE_H
8
#define __WVSUBPROCQUEUE_H
9
10
#include "wvsubproc.h"
11
58
class
WvSubProcQueue
59
{
60
public
:
65
WvSubProcQueue
(
unsigned
_maxrunning);
66
67
virtual
~
WvSubProcQueue
();
68
78
void
add
(
void
*cookie,
WvSubProc
*proc);
79
84
void
add
(
void
*cookie,
const
char
*cmd,
const
char
*
const
*argv);
85
95
int
go
();
96
103
void
finish
();
104
106
unsigned
running
()
const
;
107
109
unsigned
remaining
()
const
;
110
112
bool
isempty
()
const
;
113
114
private
:
115
struct
Ent
116
{
117
Ent(
void
*_cookie,
WvSubProc
*_proc)
118
{
119
cookie = _cookie;
120
proc = _proc;
121
redo =
false
;
122
}
123
124
~Ent()
125
{
126
if
(proc)
delete
proc;
127
}
128
129
void
*cookie;
130
WvSubProc
*proc;
131
bool
redo;
132
};
133
DeclareWvList(Ent);
134
135
unsigned
maxrunning;
136
EntList runq, waitq;
137
138
bool
cookie_running();
139
};
140
141
142
#endif // __WVSUBPROCQUEUE_H
143
Generated on Tue Mar 1 2016 21:28:37 for WvStreams by
1.8.4