Accounting Software
Small Business Software Estimating Software
Time Tracking SoftwareTime Management SoftwareTime Billing SoftwareProject Management SoftwareBookkeeping SoftwareContact Management SoftwareBusiness Management Software

Simple Lists (Header)

Link to: source code | lists directory

Copyright Turtle Creek Software 1996-2006. All Rights Reserved.

This class manages simple text lists for the Goldenseal accounting software,
retail sales software, project management software and business management software.

class DB_SimpleList : public DB_PersistentObject
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW DB_SimpleList; }

DB_SimpleList();
virtual ~DB_SimpleList() {}

virtual DBid GetDBClassID(void) const { return id_SimpleList; }

virtual void CopyFrom(DB_PersistentObject *source, const UInt8 copyFlags = 0);

virtual NeoSize GetFileLength(const CNeoFormat *aFormat) const;

virtual Boolean GetMemberValue(const TagType aTag, const TagType aType,
void *aValue) const;
virtual Boolean SetMemberValue(const TagType aTag, const TagType aType,
const void *aValue);

virtual void ReadObject(CNeoStream *aStream, const TagType aTag);
virtual void WriteObject(CNeoStream *aStream, const TagType aTag);

virtual CTextString GetName() const { return mName; }
virtual CTextString GetMenuName() const { return mName; }
virtual void SetName(const CTextString inName)
{
TCS_ASSERTMsg(!IsInDatabase(), TCS_GetErrString(errID_BadDatabaseChange));
mName = inName;
}

virtual void UpdateUseCount(const Boolean removeItem);
virtual UInt16 GetUseCount() const { return mUseCount; }

virtual Boolean CanBeDeleted(const Boolean giveMessage = true) const;

virtual void FillDataReport(CTCS_Table *table, CNeoStream *stream) const;

virtual void SetEndSafetyTag() { mEndSafetyTag = tag_endsafetytag; }
protected:

// string members
CTextString mName;

// calculated member
UInt16 mUseCount; // TCS 6/26/02

TagType mEndSafetyTag; // TCS 9/8/02

enum
{
cCopyFileLength = 0,

cFileLength = cCopyFileLength + sizeof(UInt16) +
sizeof(TagType)
};
};/**********************************************************************
FOLLOWING ARE SPECIFIC SIMPLE LISTS
**********************************************************************/
/**************************************************************************/
class CActionTaken : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CActionTaken; }

CActionTaken() {}
virtual ~CActionTaken() {}

virtual DBid GetDBClassID(void) const { return id_ActionTaken; }
};
/**************************************************************************/
class CContactType : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CContactType; }

CContactType() {}
virtual ~CContactType() {}

virtual DBid GetDBClassID(void) const { return id_ContactType; }
};
/**************************************************************************/
class CInvestmentType : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CInvestmentType; }

CInvestmentType() {}
virtual ~CInvestmentType() {}

virtual DBid GetDBClassID(void) const { return id_InvestmentType; }
};
/**************************************************************************/
class CDocumentType : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CDocumentType; }

CDocumentType() {}
virtual ~CDocumentType() {}

virtual DBid GetDBClassID(void) const { return id_DocumentType; }
};
/**************************************************************************/
// we no longer use CTool for tools- they are now handled as cost items.
// this class and id are available for another simple list.
class CTool : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CTool; }

CTool() {}
virtual ~CTool() {}

virtual DBid GetDBClassID(void) const { return id_Tool; }

virtual Boolean GetMemberValue(const NeoTag aTag, const NeoTag aType,
void *aValue) const;
virtual Boolean SetMemberValue(const NeoTag aTag, const NeoTag aType,
const void *aValue);
};
/**************************************************************************/
class CLocationClass : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CLocationClass; }

CLocationClass() {}
virtual ~CLocationClass() {}

virtual DBid GetDBClassID(void) const { return id_LocationClass; }
};
/**************************************************************************/
class CProspectSource : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CProspectSource; }

CProspectSource() {}
virtual ~CProspectSource() {}

virtual DBid GetDBClassID(void) const { return id_ProspectSource; }
};
/**************************************************************************/
class CAddressType : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CAddressType; }

CAddressType() {}
virtual ~CAddressType() {}

virtual DBid GetDBClassID(void) const { return id_AddressType; }
};
/**************************************************************************/
class CAppointmentType : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CAppointmentType; }

CAppointmentType() {}
virtual ~CAppointmentType() {}

virtual DBid GetDBClassID(void) const { return id_AppointmentType; }
};
/**************************************************************************/
class CProblemType : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CProblemType; }

CProblemType() {}
virtual ~CProblemType() {}

virtual DBid GetDBClassID(void) const { return id_ProblemType; }
};
/**************************************************************************/
class CInfoType : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CInfoType; }

CInfoType() {}
virtual ~CInfoType() {}

virtual DBid GetDBClassID(void) const { return id_InfoType; }
};
/**************************************************************************/
class CSubcontractType : public DB_SimpleList
{
public:

static CLASS_DESC *sDescriptor;
static DB_PersistentObject *MakeNew() { return TCS_NEW CSubcontractType; }

CSubcontractType() {}
virtual ~CSubcontractType() {}

virtual DBid GetDBClassID(void) const { return id_SubcontractType; }
};