WvStreams
Main Page
Modules
Classes
Files
File List
File Members
include
xplc
xplc.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
*
3
* XPLC - Cross-Platform Lightweight Components
4
* Copyright (C) 2000-2003, Pierre Phaneuf
5
* Copyright (C) 2002, Net Integration Technologies, Inc.
6
*
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Lesser General Public License
9
* as published by the Free Software Foundation; either version 2.1 of
10
* the License, or (at your option) any later version.
11
*
12
* This library is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
16
*
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this library; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20
* USA
21
*
22
* As a special exception, you may use this file as part of a free
23
* software library without restriction. Specifically, if other files
24
* instantiate templates or use macros or inline functions from this
25
* file, or you compile this file and link it with other files to
26
* produce an executable, this file does not by itself cause the
27
* resulting executable to be covered by the GNU Lesser General Public
28
* License. This exception does not however invalidate any other
29
* reasons why the executable file might be covered by the GNU Lesser
30
* General Public License.
31
*/
32
33
#ifndef __XPLC_XPLC_H__
34
#define __XPLC_XPLC_H__
35
36
#if defined(__GNUC__) && __GNUC__ > 3
37
# pragma GCC system_header
38
#endif
39
45
#include <xplc/core.h>
46
#include <
xplc/utils.h
>
47
#include <
xplc/ptr.h
>
48
55
class
XPLC
{
56
private
:
57
xplc_ptr<IServiceManager>
servmgr;
58
public
:
59
XPLC
(): servmgr(XPLC_getServiceManager()) {}
64
XPLC
(
IServiceManager
* _servmgr): servmgr(
do_addRef
(_servmgr)) {}
65
69
void
addModuleDirectory
(
const
char
* directory);
70
75
IObject
*
get
(
const
UUID
& uuid) {
76
return
servmgr->getObject(uuid);
77
}
82
template
<
class
Interface>
83
Interface*
get
(
const
UUID
& uuid) {
84
return
mutate<Interface>(servmgr->getObject(uuid));
85
}
86
92
IObject
*
create
(
const
UUID
& cid);
97
template
<
class
Interface>
98
Interface*
create
(
const
UUID
& cid) {
99
return
mutate<Interface>(
create
(cid));
100
}
101
107
IObject
*
create
(
const
char
*);
112
template
<
class
Interface>
113
Interface*
create
(
const
char
* aMoniker) {
114
return
mutate<Interface>(
create
(aMoniker));
115
}
116
};
117
118
#endif
/* __XPLC_XPLC_H__ */
Generated on Wed Aug 28 2019 23:57:14 for WvStreams by
1.8.3.1