The SWORD Project
1.9.0.svnversion
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
swobject.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* swobject.h - class SWObject: used as lowest base class for
4
* many SWORD objects
5
*
6
* $Id: swobject.h 3808 2020-10-02 13:23:34Z scribe $
7
*
8
* Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
9
* CrossWire Bible Society
10
* P. O. Box 2528
11
* Tempe, AZ 85280-2528
12
*
13
* This program is free software; you can redistribute it and/or modify it
14
* under the terms of the GNU General Public License as published by the
15
* Free Software Foundation version 2.
16
*
17
* This program is distributed in the hope that it will be useful, but
18
* WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* General Public License for more details.
21
*
22
*/
23
24
#ifndef SWOBJECT_H
25
#define SWOBJECT_H
26
27
#include <
defs.h
>
28
29
SWORD_NAMESPACE_START
30
34
class
SWDLLEXPORT
SWClass
{
35
36
private
:
37
const
char
**
descends
;
38
39
public
:
40
SWClass
(
const
char
**descends) {
41
this->descends = descends;
42
}
43
44
bool
isAssignableFrom(
const
char
*className)
const
;
45
};
46
52
class
SWDLLEXPORT
SWObject
{
53
54
protected
:
55
const
SWClass
*
myClass
;
56
57
public
:
58
// SWObject();
59
SWObject
(
const
SWClass
&
classdef
);
63
const
SWClass
*
getClass
()
const
{
64
return
myClass;
65
}
66
};
67
68
SWORD_NAMESPACE_END
69
#endif
SWORD_NAMESPACE_START
#define SWORD_NAMESPACE_START
Definition:
defs.h:39
SWClass
Definition:
swobject.h:34
SWDLLEXPORT
#define SWDLLEXPORT
Definition:
defs.h:171
SWObject::myClass
const SWClass * myClass
Definition:
swobject.h:55
defs.h
SWObject::getClass
const SWClass * getClass() const
Definition:
swobject.h:63
SWObject
Definition:
swobject.h:52
SWClass::SWClass
SWClass(const char **descends)
Definition:
swobject.h:40
classdef
static const SWClass classdef(classes)
SWORD_NAMESPACE_END
#define SWORD_NAMESPACE_END
Definition:
defs.h:40
SWClass::descends
const char ** descends
Definition:
swobject.h:37
include
swobject.h
Generated by
1.8.5