The SWORD Project  1.9.0.svnversion
 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 
30 
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 
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 
69 #endif
#define SWORD_NAMESPACE_START
Definition: defs.h:39
#define SWDLLEXPORT
Definition: defs.h:171
const SWClass * myClass
Definition: swobject.h:55
const SWClass * getClass() const
Definition: swobject.h:63
SWClass(const char **descends)
Definition: swobject.h:40
static const SWClass classdef(classes)
#define SWORD_NAMESPACE_END
Definition: defs.h:40
const char ** descends
Definition: swobject.h:37