summaryrefslogtreecommitdiff
path: root/ciao/ComponentServer/CIAO_ComponentInstallation_Impl.h
blob: 3ca52bb160835533de09aeea1fa85b3e3013927f (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
62
63
64
65
// -*- C++ -*-

//=============================================================================
/**
 *  @file    CIAO_ComponentInstallation_Impl.h
 *
 *  $Id$
 *
 * @brief  Return location of component artifact
 *
 * @author Erwin Gottlieb <eg@prismtech.com>
 */
//=============================================================================

#ifndef COMPONENTINSTALLATION_IMPL_H_
#define COMPONENTINSTALLATION_IMPL_H_

#include "ace/Map_Manager.h"
#include "ciao/ComponentServer/CIAO_CS_ClientS.h"

#include "tao/ORB.h"
#include "ciao/ComponentServer/CIAO_CS_Client_svnt_export.h"

namespace CIAO
{
  namespace Deployment
  {

    class CIAO_CS_CLIENT_SVNT_Export ComponentInstallation_Impl
      : public virtual POA_Components::Deployment::ComponentInstallation
    {
    public:
      ComponentInstallation_Impl();

      virtual ~ComponentInstallation_Impl();

      virtual void install (const char * implUUID,
                            const char * component_loc);

      virtual void replace (const char * implUUID,
                            const char * component_loc);

      virtual void remove (const char * implUUID);

      virtual char * get_implementation (const char * implUUID);

      virtual char * get_valuetypefactory_location (const char * implUUID,
                                                    const char * repid);

      void install_valuetypefactory_location (const char * implUUID,
                                              const char * repid,
                                              const char * loc);

    private:
      typedef ACE_Map_Manager< ACE_CString, ACE_CString, ACE_Null_Mutex > TLocations;
      TLocations locations_;

      static ACE_CString valuefactory_key (const char* uuid, const char* repid)
      {
        return ACE_CString (repid) + "@" + uuid;
      };
    };
  }
}
#endif /*COMPONENTINSTALLATION_IMPL_H_*/