(Event+Time).Variant Operators
2.3
Operators for Timed Discrete Event Systems in Dioids
factoryT.h
1
#ifndef __FACTORYT__
2
#define __FACTORYT__
3
4
5
#include<vector>
6
7
8
namespace
etvo
9
{
10
/*************************************************************************************/
11
/*************************************************************************************/
12
template
<
class
T>
13
class
Factory
{
14
public
:
15
virtual
T create()
const
= 0;
16
virtual
std::vector<T> createN(
unsigned
int
n)
const
17
{
18
std::vector<T> vec(n);
19
for
(
unsigned
int
i = 0; i < n; i++)
20
{
21
vec[i] = create();
22
}
23
return
vec;
24
}
25
};
26
27
}
28
#endif
etvo
Definition:
etvoException.cpp:5
etvo::Factory
Definition:
factoryT.h:13
test
factory
factoryT.h
Generated by
1.8.14