The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SWClass Class Reference

#include <swobject.h>

+ Collaboration diagram for SWClass:

Public Member Functions

bool isAssignableFrom (const char *className) const
 
 SWClass (const char **descends)
 

Private Attributes

const char ** descends
 

Detailed Description

Class used for SWDYNAMIC_CAST to save the inheritance order.

Definition at line 34 of file swobject.h.

Constructor & Destructor Documentation

SWClass::SWClass ( const char **  descends)
inline

Definition at line 40 of file swobject.h.

40  {
41  this->descends = descends;
42  }
const char ** descends
Definition: swobject.h:37

Member Function Documentation

SWORD_NAMESPACE_START bool SWClass::isAssignableFrom ( const char *  className) const

Definition at line 37 of file swobject.cpp.

37  {
38  // skip class qualifier, like 'const VerseKey'
39  const char *space = strchr(className, ' ');
40  if (space) className = space + 1;
41  for (int i = 0; descends[i]; ++i) {
42 #ifndef __CYGWIN__
43  if (!sword::stricmp(descends[i], className))
44 #else
45  if (!stricmp(descends[i], className))
46 #endif
47  return true;
48  }
49  return false;
50 }
int stricmp(const char *s1, const char *s2)
Definition: utilstr.cpp:194
const char ** descends
Definition: swobject.h:37

Member Data Documentation

const char** SWClass::descends
private

Definition at line 37 of file swobject.h.


The documentation for this class was generated from the following files: