summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h
blob: 431d0fc25f5ba2b28b3ce59f7d282c7bc2e7ddf1 (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
/* -*- C++ -*- */
//=============================================================================
/**
 *  @file    PG_Properties_Encoder.h
 *
 *  $Id$
 *
 *  This file declares a class to help manage PortableGroup::Properties
 *
 *  @author Dale Wilson <wilson_d@ociweb.com>
 */
//=============================================================================
#ifndef TAO_PG_PROPERTIES_ENCODER_H
#define TAO_PG_PROPERTIES_ENCODER_H
#include "orbsvcs/PortableGroupS.h"
#include "orbsvcs/CosNamingC.h"
#include "portablegroup_export.h"

#include "ace/Vector_T.h"
#include "ace/Pair_T.h"

namespace TAO_PG
{
  class TAO_PortableGroup_Export Properties_Encoder
  {
    typedef ACE_Pair< ACE_CString, PortableGroup::Value> NamedValue;
    typedef ACE_Vector< NamedValue, 10 > NamedValueVec;

  public:
    Properties_Encoder ();
    ~Properties_Encoder ();

    void add (const char * name, const PortableGroup::Value & value);

    void encode (PortableGroup::Properties_var & property_set) const;

  private:
    Properties_Encoder (const Properties_Encoder & rhs);
    Properties_Encoder & operator = (const Properties_Encoder & rhs);
  private:
    NamedValueVec values_;
  };

} //namespace TAO_PG

#endif // TAO_PG_PROPERTIES_ENCODER_H