WvStreams
debian/libwvstreams-dev/usr/include/wvstreams/wvmonikerregistry.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 * Support for moniker registries. See wvmoniker.h.
6 */
7#ifndef __WVMONIKERREGISTRY_H
8#define __WVMONIKERREGISTRY_H
9
10#include "wvmoniker.h"
11#include "wvlinklist.h"
12
18class WvMonikerRegistry //: public GenericComponent<IObject>
19{
20 struct Registration
21 {
22 WvString id;
23 WvMonikerCreateFunc *func;
24
25 Registration(WvStringParm _id, WvMonikerCreateFunc *_func)
26 : id(_id), func(_func)
27 { }
28 };
29
30 DeclareWvList(Registration);
31
32 unsigned refcount;
33
34public:
35 UUID reg_iid;
36 RegistrationList list;
37
38 WvMonikerRegistry(const UUID &iid);
39 virtual ~WvMonikerRegistry();
40
41 virtual void add(WvStringParm id, WvMonikerCreateFunc *func,
42 const bool override = false);
43 virtual void del(WvStringParm id);
44
45 virtual void *create(WvStringParm _s, IObject *_obj);
46
47 // find a registry for objects of the given interface UUID
48 static WvMonikerRegistry *find_reg(const UUID &iid);
49
50 // IObject stuff
51 virtual IObject *getInterface(const UUID &uuid);
52
53 // we can't use GenericComponent's implementation, since we have to
54 // unregister ourselves on the second-last release().
55 virtual unsigned int addRef();
56 virtual unsigned int release();
57};
58
59
60#endif // __WVMONIKERREGISTRY_H
The basic interface which is included by all other XPLC interfaces and objects.
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
A list for holding moniker-prefix to factory-function mappings.
WvString is an implementation of a simple and efficient printable-string class.