summaryrefslogtreecommitdiff
path: root/TAO/CIAO/DAnCE/Config_Handlers/Base_Handler.cpp
blob: a490921f204cb79889ff2b248489db6ff9b73e22 (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
// $Id$

#include "Base_Handler.h"
#include "tao/CORBA_String.h"
#include "tao/StringSeqC.h"

namespace CIAO
{
  namespace Config_Handlers
  {
    Base_Handler::Base_Handler (void)
    {
    }

    Base_Handler::~Base_Handler (void)
    {
    }

    void
    Base_Handler::populate_string (const ::XMLSchema::string <char> &str,
                                   CORBA::String_out &tofill)
    {
      tofill =
        CORBA::string_dup (str.c_str ());
    }

    void
    Base_Handler::populate_string_seq (const ::XMLSchema::string <char> &str,
                                       CORBA::StringSeq &tofill)
    {
      tofill.length (tofill.length () + 1);
      tofill[tofill.length () - 1] =
        CORBA::string_dup (str.c_str ());
    }

    bool
    Base_Handler::bind_ref (ACE_CString& id, size_t index)
    {
      int retval =
        this->idref_map_.bind (id, index);

      if (return < 0)
        return false;

      return true;
    }

    bool
    Base_Handler::find_ref (ACE_CString& id, size_t val)
    {
      int retval =
        this->idref_map_.find (id, val);

      if (return < 0)
        return false;

      return true;
    }

  }
}