Accounting Software
Small Business Software Estimating Software
Unit Cost SoftwareConstruction Estimating SoftwareProject Estimating SoftwareCost Estimation SoftwareCost Estimating SoftwareConstruction Management SoftwareBusiness Management Software

Job Cost Categories (Header)

Link to: source code | unit cost directory

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

This class manages cost categories in the Goldenseal accounting software,
estimating software, unit cost software, job costing software and construction accounting software.

class CCategory : public DB_ArrayOwner<DBid>
{
public:

class CCategory_Desc : public CLASS_DESC
{
public:
CCategory_Desc()
: CLASS_DESC(id_Category, id_DescribedPersistent, CCategory::MakeNew) {}
virtual ~CCategory_Desc() {}

virtual Boolean GetTableColInfo(const TagType tag, const TableIndexT col,
STableColInfo *colInfo);
virtual SInt32 GetNumTableCols(const TagType /*tableTag*/) { return 1; }
};

static CLASS_DESC *sDescriptor;

static DB_PersistentObject *MakeNew() { return TCS_NEW CCategory; }

CCategory();
virtual ~CCategory() {}

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

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

virtual NeoSize GetFileLength(const CNeoFormat *aFormat) const;

virtual Boolean GetMemberValue(const NeoTag aTag, const NeoTag aType,
void *aValue) const;
virtual Boolean SetMemberValue(const NeoTag aTag, const NeoTag aType,
const void *aValue);
virtual void ReadObject(CNeoStream *aStream, const TagType aTag);
virtual void WriteObject(CNeoStream *aStream, const TagType aTag);

virtual Boolean GetEntryFromRow(const CTCS_Table &/*aTable*/,
const TableIndexT /*row*/,
DBid */*outInfo*/)
{ return true; } // not needed since data is not changed

virtual Boolean FillRowFromEntry(CTCS_Table *aTable, const TableIndexT row,
const DBid &inInfo);

virtual CTextString ExportColumnCString(const TableIndexT /*col*/,
const DBid &/*outInfo*/)
{ return CTextString(""); } // we never export

virtual SInt32 GetExportRowCount() const { return 0; } // we don't export the table

virtual Boolean SetTableMember(const TagType /*tag*/, CTCS_Table */*aTable*/)
{ return true; } // not needed TCS 9/8/99

virtual Boolean ImportColumnCString(const TableIndexT /*col*/,
const CTextString &/*inString*/, DBid */*inInfo*/)
{ return true; } // we fill our own data

virtual void AddCatSystem(const DBid inID);
virtual void RemoveCatSystem(const DBid inID);
virtual Boolean CanBeDeleted(const Boolean /*giveMessage*/ = true) const;
virtual Boolean IncludeInStarterFile() const { return mIncludeInStarterFile; } // TCS 12/5/02

virtual void FinishImportCreate();
virtual CTextString GetFullName() const;


virtual UInt8 GetHierarchy() const { return mHierarchy; }
virtual UInt8 GetStatusForMenuArray() const { return mHierarchy; } // rev TCS 4/28/03

virtual Boolean CanBeTandMBilled() const { return mBillable; }

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

virtual void SetEndSafetyTag() { mEndSafetyTag = tag_endsafetytag; }

protected:

// string member
CTextString mFullName;
// copied members
CMoney mRefNum;

DBid mIncomeTaxField; // unused

UInt8 mHierarchy;
// *** NEVER insert members before this bitfield!!!
UInt8 mBillable:1, // TCS moved 11/7/02
mIncludeInStarterFile:1, // TCS 12/5/02
catFiller:6;

// calculated members
TagType mEndSafetyTag; // TCS 9/8/02

enum
{
cCopyFileLength = sizeof(CMoney) +
sizeof(DBid) +
2*sizeof(UInt8),

cFileLength = cCopyFileLength +
sizeof(TagType)
};
};