summaryrefslogtreecommitdiff
path: root/TAO/tests/Typedef_String_Array/testImpl.cpp
blob: 5256013a2597f722661c82b9efd00fe965c78868 (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
// $Id$

#include "testImpl.h"

static const CORBA::ULong maxd = 15;
static const char* data[maxd] = { "Hi there",
                                  "This is a test",
                                  "of typedefed string",
                                  "arrays",
                                  "This test should work with either set",
                                  "of typedefs",
                                  "typedef string MyString",
                                  "typedef MyString ArrayOfString[15]",
                                  "or",
                                  "#define MyString string",
                                  "typedef MyString ArrayOfString[15]",
                                  "or",
                                  "typedef string MyString",
                                  "typedef string ArrayOfString[15]",
                                  "thats it"
                                };

TestImpl::TestImpl (CORBA::ORB_ptr orb)
 : orb_ (CORBA::ORB::_duplicate(orb))
{
}


void
TestImpl::get_strings (ArrayOfString_out strings)
{
  ACE_NEW (strings, ArrayOfString);

  for (CORBA::ULong i = 0; i < maxd; i++)
    {
      strings[i] = data[i];
    }

  orb_->shutdown();
}