summaryrefslogtreecommitdiff
path: root/examples/Mem_Map/IO-tests/IO_Test.h
blob: 659a85eec15d9ea4871f42984f8309ce1898c901 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* -*- C++ -*- */
// $Id$

/* Class hierarchy for the File I/O tests. */

#include "ace/Profile_Timer.h"

/* Base class for all the File I/O tests. */

class IO_Test
{
public:
  // Initialize the test name
  IO_Test (const char *name, ACE_Profile_Timer &tm);

  // Return the name of the test
  const char *name (void);

  // Execute the IO test (note this is a pure virtual function...)
  virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp) = 0;

protected:
  // Name of the test
  const char *name_; 
  
  // Reference to a timer
  ACE_Profile_Timer &tm_;
};

class Slow_Read_Write_Test : public IO_Test
{
public:
  Slow_Read_Write_Test (char *name, ACE_Profile_Timer &tm);
  virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp);
};

class Stdio_Test : public IO_Test
{
public:
  Stdio_Test (char *name, ACE_Profile_Timer &tm);
  virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp);
};

class Block_Read_Write_Test : public IO_Test
{
public:
  Block_Read_Write_Test (char *name, ACE_Profile_Timer &tm);
  virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp);
};

class Block_Fread_Fwrite_Test : public IO_Test
{
public:
  Block_Fread_Fwrite_Test (char *name, ACE_Profile_Timer &tm);
  virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp);
};

class Mmap1_Test : public IO_Test
{
public:
  Mmap1_Test (char *name, ACE_Profile_Timer &tm);
  virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp);
};

class Mmap2_Test : public IO_Test
{
public:
  Mmap2_Test (char *name, ACE_Profile_Timer &tm);
  virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp);
};