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

#include <versificationmgr.h>

+ Collaboration diagram for VersificationMgr::Book:

Classes

class  Private
 

Public Member Functions

 Book ()
 
 Book (const Book &other)
 
 Book (const char *longName, const char *osisName, const char *prefAbbrev, int chapMax)
 
int getChapterMax () const
 
const char * getLongName () const
 
const char * getOSISName () const
 
const char * getPreferredAbbreviation () const
 
int getVerseMax (int chapter) const
 
Bookoperator= (const Book &other)
 
 ~Book ()
 

Private Member Functions

void init ()
 

Private Attributes

unsigned int chapMax
 
SWBuf longName
 
SWBuf osisName
 
Privatep
 
SWBuf prefAbbrev
 

Friends

struct BookOffsetLess
 
class System
 

Detailed Description

Definition at line 84 of file versificationmgr.h.

Constructor & Destructor Documentation

VersificationMgr::Book::Book ( )
inline

Definition at line 106 of file versificationmgr.h.

106 { init(); }
VersificationMgr::Book::Book ( const Book other)

Definition at line 265 of file versificationmgr.cpp.

265  {
266  longName = other.longName;
267  osisName = other.osisName;
268  prefAbbrev = other.prefAbbrev;
269  chapMax = other.chapMax;
270  init();
271  (*p) = *(other.p);
272 }
VersificationMgr::Book::Book ( const char *  longName,
const char *  osisName,
const char *  prefAbbrev,
int  chapMax 
)
inline

Definition at line 109 of file versificationmgr.h.

109  {
110  this->longName = longName;
111  this->osisName = osisName;
112  this->prefAbbrev = prefAbbrev;
113  this->chapMax = chapMax;
114  init();
115  }
VersificationMgr::Book::~Book ( )

Definition at line 286 of file versificationmgr.cpp.

286  {
287  delete p;
288 }

Member Function Documentation

int VersificationMgr::Book::getChapterMax ( ) const
inline

Definition at line 120 of file versificationmgr.h.

120 { return chapMax; }
const char* VersificationMgr::Book::getLongName ( ) const
inline

Definition at line 117 of file versificationmgr.h.

117 { return longName.c_str(); }
const char * c_str() const
Definition: swbuf.h:158
const char* VersificationMgr::Book::getOSISName ( ) const
inline

Definition at line 118 of file versificationmgr.h.

118 { return osisName.c_str(); }
const char * c_str() const
Definition: swbuf.h:158
const char* VersificationMgr::Book::getPreferredAbbreviation ( ) const
inline

Definition at line 119 of file versificationmgr.h.

119 { return prefAbbrev.c_str(); }
const char * c_str() const
Definition: swbuf.h:158
int VersificationMgr::Book::getVerseMax ( int  chapter) const

Definition at line 291 of file versificationmgr.cpp.

291  {
292  chapter--;
293  return (p && (chapter < (signed int)p->verseMax.size()) && (chapter > -1)) ? p->verseMax[chapter] : -1;
294 }
void VersificationMgr::Book::init ( )
private

Definition at line 156 of file versificationmgr.cpp.

156  {
157  p = new Private();
158 }
VersificationMgr::Book & VersificationMgr::Book::operator= ( const Book other)

Definition at line 275 of file versificationmgr.cpp.

275  {
276  longName = other.longName;
277  osisName = other.osisName;
278  prefAbbrev = other.prefAbbrev;
279  chapMax = other.chapMax;
280  init();
281  (*p) = *(other.p);
282  return *this;
283 }

Friends And Related Function Documentation

friend struct BookOffsetLess
friend

Definition at line 87 of file versificationmgr.h.

friend class System
friend

Definition at line 86 of file versificationmgr.h.

Member Data Documentation

unsigned int VersificationMgr::Book::chapMax
private

Maximum chapters in book

Definition at line 101 of file versificationmgr.h.

SWBuf VersificationMgr::Book::longName
private

book name

Definition at line 92 of file versificationmgr.h.

SWBuf VersificationMgr::Book::osisName
private

OSIS Abbreviation

Definition at line 95 of file versificationmgr.h.

Private* VersificationMgr::Book::p
private

Definition at line 88 of file versificationmgr.h.

SWBuf VersificationMgr::Book::prefAbbrev
private

Preferred Abbreviation

Definition at line 98 of file versificationmgr.h.


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