summaryrefslogtreecommitdiff
path: root/ace/Service_Object.i
blob: 1b15899cc49ca50823039eb86d5f59c13308a767 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/* -*- C++ -*- */
// $Id$

// Service_Object.i

ACE_INLINE ACE_Service_Object_Ptr::ACE_Service_Object_Ptr (ACE_Service_Object *so)
  : service_object_ (so)
{
}

ACE_INLINE ACE_Service_Object_Ptr::~ACE_Service_Object_Ptr (void)
{
  this->service_object_->fini ();
  delete this->service_object_;
}

ACE_INLINE ACE_Service_Object *
ACE_Service_Object_Ptr::operator-> ()
{
  return this->service_object_;
}

ACE_INLINE const ASYS_TCHAR *
ACE_Service_Type::name (void) const
{
  ACE_TRACE ("ACE_Service_Type::name");
  return this->name_;
}

ACE_INLINE const char *
ACE_Service_Type::chname (void) const
{
#if !defined (ACE_HAS_MOSTLY_UNICODE_APIS)
  return this->name ();
#else
  return this->chname_;
#endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */
}

ACE_INLINE const ACE_Service_Type_Impl *
ACE_Service_Type::type (void) const
{
  ACE_TRACE ("ACE_Service_Type::type");
  return this->type_;
}

ACE_INLINE ACE_SHLIB_HANDLE
ACE_Service_Type::handle (void) const
{
  ACE_TRACE ("ACE_Service_Type::handle");
  return this->handle_;
}

ACE_INLINE void
ACE_Service_Type::name (const ASYS_TCHAR *n)
{
  ACE_TRACE ("ACE_Service_Type::name");

  delete [] (ASYS_TCHAR *) this->name_;
  this->name_ = ACE_OS::strcpy (new ASYS_TCHAR [ACE_OS::strlen (n) + 1], n);
#if defined (ACE_HAS_MOSTLY_UNICODE_APIS)
  delete [] (char *) this->chname_;
  this->chname_ = ACE_OS_WString (this->name_).char_rep ();
#endif /* !ACE_HAS_MOSTLY_UNICODE_APIS */
}

ACE_INLINE void
ACE_Service_Type::type (const ACE_Service_Type_Impl *o, int enabled)
{
  ACE_TRACE ("ACE_Service_Type::type");
  this->type_ = o;
  ((ACE_Service_Type *) this)->active_ = enabled;
}

ACE_INLINE void
ACE_Service_Type::handle (const ACE_SHLIB_HANDLE h)
{
  ACE_TRACE ("ACE_Service_Type::handle");
  this->handle_ = h;
}

ACE_INLINE int
ACE_Service_Type::active (void) const
{
  ACE_TRACE ("ACE_Service_Type::active");
  return this->active_ != 0;
}

ACE_INLINE void
ACE_Service_Type::active (int turnon)
{
  ACE_TRACE ("ACE_Service_Type::active");
  this->active_ = turnon;
}

ACE_INLINE int
ACE_Service_Type::fini_called (void) const
{
  ACE_TRACE ("ACE_Service_TYpe::fini_called");
  return this->fini_already_called_;
}