summaryrefslogtreecommitdiff
path: root/ace/Dynamic_Service.h
blob: 4de8153b3f45829d54fa580498a0c9d3d8dc6868 (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
/* -*- C++ -*- */
// $Id$

// ============================================================================
//
// = LIBRARY
//    ace
//
// = FILENAME
//    Dynamic_Service.h
//
// = AUTHOR
//    Prashant Jain, Doug Schmidt
//
// ============================================================================

#ifndef ACE_DYNAMIC_SERVICE_H
#include "ace/pre.h"
#define ACE_DYNAMIC_SERVICE_H

#include "ace/OS.h"

template <class SERVICE>
class ACE_Dynamic_Service
{
  // = TITLE
  //     Provides a general interface to retrieve arbitrary objects
  //     from the ACE service repository.
  //
  // = DESCRIPTION
  //     Uses "name" for lookup in the ACE service repository. Obtains
  //     the object and returns it as the appropriate type.
public:
  static SERVICE *instance (const char *name);
  // Return instance using <name> to search the Service_Repository.

  void dump (void) const;
  // Dump the current state of the object.
};

#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
# include "ace/Dynamic_Service.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */

#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
# pragma implementation ("Dynamic_Service.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */

#include "ace/post.h"
#endif /* ACE_DYNAMIC_SERVICE_H */