Link to: header | lists directory
Copyright Turtle Creek Software 1996-2006. All Rights Reserved.
Comments
CSubBillingRate
This class manages subcontractor billing rates for the Goldenseal accounting software,
time tracking software, project
management software and business management software.
Subcontractor billing rates for time and materials billing and job costing.
Superclass = CBillingRate
Constructor
/*********************************************************************************
constructor TCS 8/31/00
*********************************************************************************/
CSubBillingRate::CSubBillingRate()
:THE_SUPERCLASS()
{
mEndSafetyTag = tag_endsafetytag; // TCS 9/8/02
}
Source Code
/*********************************************************************************
GetFileLength TCS 8/31/00
return the file length to reserve for this object
*********************************************************************************/
NeoSize CSubBillingRate::GetFileLength(const CNeoFormat *aFormat) const
{
return THE_SUPERCLASS::GetFileLength(aFormat) + cFileLength;
}
/*********************************************************************************
GetMemberValue
get the value of the member with the given tag
*********************************************************************************/
Boolean CSubBillingRate::GetMemberValue(const TagType aTag, const TagType aType,
void *aValue) const
{
switch (aTag)
{
case tag_calcmethod:
return ConvertEnumMember(mCalcMethod, MENU_SubBillingRateTypes,
aValue, aType);
break;
default:
return THE_SUPERCLASS::GetMemberValue(aTag, aType, aValue);
break;
}
}
/*********************************************************************************
ReadObject TCS 9/9/02
read the persistent object's data in from a stream
*********************************************************************************/
void CSubBillingRate::ReadObject(CNeoStream *aStream,
const TagType aTag)
{
TCS_FailNILMsg(aStream, TCS_GetErrString(errID_BadStream));
CNeoDebugImport checker(aStream, this, cCheckTooSmall);
THE_SUPERCLASS::ReadObject(aStream, aTag);
if (!IsIOValid()) // TCS 2/5/02
return;
mEndSafetyTag = aStream->ReadEndSafetyTag(this); // mfs_sa rev 20feb2k3
if (!IsValidEndTag(mEndSafetyTag)) // TCS 9/8/02
ReportDamagedObject(GetDBClassID(), GetDBID());
}
/*********************************************************************************
WriteObject TCS 9/9/02
write the persistent object's data to a stream
*********************************************************************************/
void CSubBillingRate::WriteObject(CNeoStream *aStream,
const TagType aTag)
{
TCS_FailNILMsg(aStream, TCS_GetErrString(errID_BadStream));
// make sure we have valid data to write TCS 9/8/02
if (!IsValidEndTag(mEndSafetyTag))
{
ReportDamagedObject(GetDBClassID(), GetDBID());
mEndSafetyTag = tag_endsafetytag; // TCS 11/26/02
}
CNeoDebugExport checker(aStream, this, cCheckTooSmall);
THE_SUPERCLASS::WriteObject(aStream, aTag);
aStream->WriteEndSafetyTag(mEndSafetyTag, this);
}
#if CAN_USE_MARK
#pragma mark -
#endif
/*********************************************************************************
FillDataReport TCS 9/9/02
fill in a diagnostic table that shows data field values.
*********************************************************************************/
void CSubBillingRate::FillDataReport(CTCS_Table *table, CNeoStream *stream) const
{
TCS_FailNILMsg(table, TCS_GetErrString(errID_BadTable));
TCS_FailNILMsg(stream, TCS_GetErrString(errID_BadStream));
THE_SUPERCLASS::FillDataReport(table, stream);
FillEndSafetyTag(table, stream, mEndSafetyTag);
}
|