summaryrefslogtreecommitdiff
path: root/TAO/tests/Alt_Mapping/helper.h
blob: 55824f5078a3eb482d645cebcaf25ada905bf8bb (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

//=============================================================================
/**
 *  @file    helper.h
 *
 *  Defines a helper class that can generate values for the parameters used
 *  for the Param_Test example
 *
 *  @author Aniruddha Gokhale
 */
//=============================================================================


#ifndef HELPER_H
#define HELPER_H

#include "alt_mappingC.h"
#include "ace/Singleton.h"

class Generator
{
public:
  Generator ();

  ~Generator ();

  CORBA::Short gen_short ();
  CORBA::Long gen_long ();
  char* gen_string ();
  char* gen_string (int maxlength);
  CORBA::WChar* gen_wstring ();
  CORBA::WChar* gen_wstring (int maxlength);
  const Alt_Mapping::Fixed_Struct gen_fixed_struct ();

 private:
  Alt_Mapping::Fixed_Struct fixed_struct_;
};

typedef ACE_Singleton<Generator, TAO_SYNCH_RECURSIVE_MUTEX> GENERATOR;

#endif /* HELPER_H */