WvStreams
include
xplc
IObject.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
* Copyright (C) 2002, Stéphane Lajoie
7
*
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public License
10
* as published by the Free Software Foundation; either version 2.1 of
11
* the License, or (at your option) any later version.
12
*
13
* This library is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* Lesser General Public License for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this library; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21
* USA
22
*/
23
24
#ifndef __XPLC_IOBJECT_H__
25
#define __XPLC_IOBJECT_H__
26
27
#if defined(__GNUC__) && __GNUC__ > 3
28
# pragma GCC system_header
29
#endif
30
36
#include <
xplc/uuid.h
>
37
38
#ifndef UNSTABLE
39
46
#define UNSTABLE_INTERFACE static bool UNSTABLE_INTERFACE = true;
47
#else
48
#define UNSTABLE_INTERFACE
49
#endif
50
51
class
IWeakRef
;
52
65
class
IObject
{
66
UNSTABLE_INTERFACE
67
public
:
83
virtual
unsigned
int
addRef
() = 0;
84
96
virtual
unsigned
int
release
() = 0;
97
112
virtual
IObject
*
getInterface
(
const
UUID
&) = 0;
113
123
virtual
IWeakRef
*
getWeakRef
() = 0;
124
};
125
127
DEFINE_IID
(
IObject
, {0x8ca76e98, 0xb653, 0x43d7,
128
{0xb0, 0x56, 0x8b, 0x9d, 0xde, 0x9a, 0xbe, 0x9d}});
129
130
#endif
/* __XPLC_IOBJECT_H__ */
UNSTABLE_INTERFACE
#define UNSTABLE_INTERFACE
Used to mark an interface as unstable.
Definition:
IObject.h:46
IObject::release
virtual unsigned int release()=0
Indicate that you are finished using this object.
uuid.h
IObject
Definition:
IObject.h:65
IWeakRef
Definition:
IWeakRef.h:36
_GUID
The structure underlying UUIDs.
Definition:
uuid.h:94
IObject::getWeakRef
virtual IWeakRef * getWeakRef()=0
Return a weak reference to this object.
DEFINE_IID
DEFINE_IID(IObject, {0x8ca76e98, 0xb653, 0x43d7, {0xb0, 0x56, 0x8b, 0x9d, 0xde, 0x9a, 0xbe, 0x9d}})
IObject's IID.
IObject::getInterface
virtual IObject * getInterface(const UUID &)=0
Returns the requested XPLC interface.
IObject::addRef
virtual unsigned int addRef()=0
Indicate you are using this object.
Generated by
1.8.17