Accounting Software
Small Business Software Estimating Software
Inventory SoftwareInventory Control SoftwareInventory Tracking SoftwareInventory Management SoftwareConstruction Management SoftwareProject Management SoftwareBusiness Management Software

Short Text Index (Header)

Link to: source code | other data directory

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

This class manages short text values for the Goldenseal job cost accounting software,
project management software, construction estimating software
and construction project estimating software.

class DB_TagShortTextIndex : public DB_PersistentObject
{
public:

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

DB_TagShortTextIndex(const Boolean keepSorted = true);
virtual ~DB_TagShortTextIndex() {}

virtual DBid GetDBClassID() const { return id_ShortTextIndex; }

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 void ReadObject(CNeoStream *aStream, const TagType aTag);
virtual void WriteObject(CNeoStream *aStream, const TagType aTag);

Boolean GetIDArray(TObjectIDArray &array);

void ClearArray();
void SortMenuArray(); // TCS 12/20/02

SInt32 FindItemByID(const DBid compareID);
SInt32 IncludesID(const DBid id);
SInt32 GetNameArrayCount() const { return mTextArray.GetCount(); } // TCS 10/1/00

Boolean AddToArray(const DB_PersistentObject *object, const Boolean sortArray = true);
void RemoveFromArray(const DB_PersistentObject *object);
void RemoveObjectByID(const DBid id);
void HandleObjectChanged(const DB_PersistentObject *object, const Boolean doSort = true);

Boolean FindListMatches(CTCS_Array &selectorArray,TObjectIDArray &matchArray,
const Boolean matchAny); // TCS 12/18/02
Boolean FillListMatches(DB_MemberSelector *selector,
TObjectIDArray &matchArray, const Boolean matchAny, UInt8 &matchCount); // TCS 12/23/02

// DBid GetIDFromName(const CTextString *text);

void SetKeepSorted(const Boolean inValue)
{
mTextArray.SetKeepSorted(inValue);
}

DBid FetchObjectWithName(const CTextString &matchName, const DBid skipID = 0); // TCS 7/25/01
SInt32 GetRecordCount(const UInt8 /*recordRange*/) const
{ return mTextArray.GetCount(); } // TCS 7/31/01

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

virtual void SetEndSafetyTag() { mEndSafetyTag = tag_endsafetytag; }

private:
TagType mFieldTag;
DBLongClass mRecordClassID;
// array member
TShortNameIDArray mTextArray;

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

enum
{
cCopyFileLength = sizeof(TagType) +
sizeof(DBLongClass),

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