File: Framework_Component_DLL.h

package info (click to toggle)
ace 8.0.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 47,088 kB
  • sloc: cpp: 342,864; perl: 31,902; sh: 1,963; python: 532; yacc: 524; xml: 330; lex: 158; lisp: 116; makefile: 85; csh: 20; ansic: 19; tcl: 5
file content (47 lines) | stat: -rw-r--r-- 1,214 bytes parent folder | download | duplicates (2)
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

//=============================================================================
/**
 *  @file    Framework_Component_DLL.h
 *
 *  Define class needed for generating templates.
 *
 *  @author Don Hinton <dhinton@ieee.org>
 */
//=============================================================================


#ifndef ACE_TESTS_FRAMEWORK_COMPONENT_DLL_H
#define ACE_TESTS_FRAMEWORK_COMPONENT_DLL_H

#include "Framework_Component_DLL_Export.h"
#include "ace/Log_Msg.h"
#include "ace/Singleton.h"
#include "ace/Synch_Traits.h"

/// This  we will use to test the ACE_Framework_Repository
class Simple_Service
{
public:
  Simple_Service ();

  virtual ~Simple_Service ();

  virtual const ACE_TCHAR *name ();
};

// Adapter that contains the required dll_name() method and
// has the "right" name for our DLL.
template <class TYPE>
class FWCT_DLL_Singleton_Adapter_T : public TYPE
{
public:
  const ACE_TCHAR *dll_name ()
  {
    FRAMEWORK_COMPONENT_DLL_TRACE ("FWCT_DLL_Singleton_Adapter_T::dll_name");
    return ACE_TEXT("Framework_Component_DLL");
  }
};

typedef ACE_DLL_Singleton_T < FWCT_DLL_Singleton_Adapter_T <Simple_Service>, ACE_SYNCH_MUTEX > SS_SINGLETON;

#endif /* ACE_TESTS_FRAMEWORK_COMPONENT_TEST_H */