[[TOC]] = CTktFlds = CTktFlds is a C++ class that is a wrapper around struct tktfld_struct to simplify ticket programming. == Constructor == {{{ CTktFlds(void); }}} ==== Parameters ==== Constructor does not accept any parameters ==== Examples ==== {{{ CTktFlds flds; }}} This contructs the object. == Member Functions == === Clear === Clears all references or a specified item. {{{ void Clear(void); void Clear(int nFld); }}} ==== Parameters ==== * nFld - Ticket item to clear Version with no parameters clears all fields ==== Return Value ==== Function does not return a result. ==== Remarks ==== ==== Examples ==== {{{ CTktFlds flds; flds.Set(TKT_FLD_TIME, strTime); flds.Set(TKT_FLD_GROSS, strGross); PrintTkt(TKT_STD, flds); }}} {{{ CTktFlds flds; flds.Set(TKT_FLD_TIME, strTime); flds.Set(TKT_FLD_GROSS, strGross); flds.PrintTkt(TKT_STD, flds); // Clear the entire flds object to start over flds.Clear(); flds.Set(TKT_FLD_TIME, strTime); flds.Set(TKT_FLD_NET, strNet); flds.PrintTkt(TKT_ALT); }}} {{{ CTktFlds flds; flds.Set(TKT_FLD_TIME, strTime); flds.Set(TKT_FLD_GROSS, strGross); flds.PrintTkt(TKT_STD); // Clear the gross weight reference so it will not print on the alternate ticket, time will still print flds.Clear(TKT_FLD_GROSS); flds.Set(TKT_FLD_NET, strNet); flds.PrintTkt(TKT_ALT); }}} === Set === Sets a reference {{{ void Set(int nFld, string& str); void Set(int nFld, char* psz); void Set(int nFld, const char* psz); }}} ==== Parameters ==== * nFld - Field to set * str - String variable * psz - pointer to character array ==== Retrun Value ==== Function does not return any result. ==== Remarks ==== ==== Example ==== {{{ string strTime = GetTimeStr(1); // Include seconds string strGross = FormatGrossWt(1); CTktFlds flds; flds.Set(TKT_FLD_TIME, strTime); flds.Set(TKT_FLD_GROSS, strGross); PrintTkt(TKT_STD, flds); }}}