Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / Mem_Map / IO-tests / IO_Test.h
blob58c541e5baf3e97c25f0725f3c3a8d90ce2c4ccd
1 /* -*- C++ -*- */
2 /* Class hierarchy for the File I/O tests. */
4 #include "ace/Profile_Timer.h"
6 #if !defined (ACE_LACKS_PRAGMA_ONCE)
7 # pragma once
8 #endif /* ACE_LACKS_PRAGMA_ONCE */
10 /* Base class for all the File I/O tests. */
12 class IO_Test
14 public:
15 // Initialize the test name
16 IO_Test (const char *name,
17 ACE_Profile_Timer &tm);
19 // Destructor.
20 virtual ~IO_Test ();
22 // Return the name of the test
23 const char *name ();
25 // Execute the IO test (note this is a pure virtual function...)
26 virtual int run_test (int iterations,
27 FILE *input_fp,
28 FILE *output_fp) = 0;
30 protected:
31 // Name of the test
32 const char *name_;
34 // Reference to a timer
35 ACE_Profile_Timer &tm_;
38 class Slow_Read_Write_Test : public IO_Test
40 public:
41 Slow_Read_Write_Test (const char *name,
42 ACE_Profile_Timer &tm);
43 virtual int run_test (int iterations,
44 FILE *input_fp,
45 FILE *output_fp);
48 class Stdio_Test : public IO_Test
50 public:
51 Stdio_Test (const char *name,
52 ACE_Profile_Timer &tm);
53 virtual int run_test (int iterations,
54 FILE *input_fp,
55 FILE *output_fp);
58 class Block_Read_Write_Test : public IO_Test
60 public:
61 Block_Read_Write_Test (const char *name,
62 ACE_Profile_Timer &tm);
63 virtual int run_test (int iterations,
64 FILE *input_fp,
65 FILE *output_fp);
68 class Block_Fread_Fwrite_Test : public IO_Test
70 public:
71 Block_Fread_Fwrite_Test (const char *name,
72 ACE_Profile_Timer &tm);
73 virtual int run_test (int iterations,
74 FILE *input_fp,
75 FILE *output_fp);
78 class Mmap1_Test : public IO_Test
80 public:
81 Mmap1_Test (const char *name,
82 ACE_Profile_Timer &tm);
83 virtual int run_test (int iterations,
84 FILE *input_fp,
85 FILE *output_fp);
88 class Mmap2_Test : public IO_Test
90 public:
91 Mmap2_Test (const char *name,
92 ACE_Profile_Timer &tm);
93 virtual int run_test (int iterations,
94 FILE *input_fp,
95 FILE *output_fp);