WvStreams
category.cc
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 *
3 * XPLC - Cross-Platform Lightweight Components
4 * Copyright (C) 2003, Net Integration Technologies, Inc.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 * USA
20 */
21
22#include <xplc/utils.h>
23#include "category.h"
24#include "catiter.h"
25
30
31Category::Category(ICategoryManager* aMgr, CategoryEntryNode* aEntries):
32 mgr(aMgr),
33 entries(aEntries) {
34 /*
35 * Prevent the category manager from dying (which would free the
36 * list).
37 */
38 mgr->addRef();
39}
40
42 return new CategoryIterator(this, entries);
43}
44
45Category::~Category() {
46 mgr->release();
47}
48
virtual ICategoryIterator * getIterator()
Gets an iterator for the category.
Definition: category.cc:41
Allows iteration over a category.
Let you register categories and obtain information about them.
Represents a category.
Definition: ICategory.h:36
The basic interface which is included by all other XPLC interfaces and objects.
Definition: IObject.h:65
virtual unsigned int release()=0
Indicate that you are finished using this object.
Various utility functions, macros and templates.
#define UUID_MAP_END
Marks the end of an interface map.
Definition: utils.h:80
#define UUID_MAP_BEGIN(component)
Start the interface map for "component".
Definition: utils.h:63
#define UUID_MAP_ENTRY(iface)
Add an entry to an interface map.
Definition: utils.h:68