Changes between Version 1 and Version 2 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Ticket/CTktFlds


Ignore:
Timestamp:
08/26/10 09:21:29 (14 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/Ticket/CTktFlds

    v1 v2  
     1[[TOC]]
    12= CTktFlds =
    23CTktFlds is a C++ class that is a wrapper around struct tktfld_struct to simplify ticket programming.
    34
     5== Constructor ==
     6
     7{{{
     8CTktFlds(void);
     9}}}
     10
     11==== Parameters ====
     12
     13Constructor does not accept any parameters
     14
     15==== Examples ====
     16
     17{{{
     18CTktFlds flds;
     19}}}
     20
     21This contructs the object.
     22
     23== Member Functions ==
     24
     25=== Clear ===
     26Clears all references or a specified item.
     27
     28{{{
     29void Clear(void);
     30
     31void Clear(int nFld);
     32}}}
     33
     34==== Parameters ====
     35
     36 * nFld - Ticket item to clear
     37Version with no parameters clears all fields
     38
     39==== Return Value ====
     40
     41Function does not return a result.
     42
     43==== Remarks ====
     44
     45==== Examples ====
     46
     47{{{
     48CTktFlds flds;
     49flds.Set(TKT_FLD_TIME, strTime);
     50flds.Set(TKT_FLD_GROSS, strGross);
     51PrintTkt(TKT_STD, flds);
     52
     53// Clear the entire flds object to start over
     54flds.Clear();
     55flds.Set(TKT_FLD_TIME, strTime);
     56flds.Set(TKT_FLD_NET, strNet);
     57PrintTkt(TKT_ALT, flds);
     58}}}
     59
     60{{{
     61CTktFlds flds;
     62flds.Set(TKT_FLD_TIME, strTime);
     63flds.Set(TKT_FLD_GROSS, strGross);
     64PrintTkt(TKT_STD, flds);
     65
     66// Clear the gross weight reference so it will not print on the alternate ticket, time will still print
     67flds.Clear(TKT_FLD_GROSS);
     68flds.Set(TKT_FLD_NET, strNet);
     69PrintTkt(TKT_ALT, flds);
     70}}}
     71
     72=== Set ===
     73Sets a reference
     74{{{
     75void Set(int nFld, string& str);
     76void Set(int nFld, char* psz);
     77void Set(int nFld, const char* psz);
     78}}}
     79
     80==== Parameters ====
     81
     82 * nFld - Field to set
     83 * str - String variable
     84 * psz - pointer to character array
     85
     86==== Retrun Value ====
     87 
     88Function does not return any result.
     89
     90==== Remarks ====
     91
     92
     93==== Example ====
     94
     95{{{
     96string strTime = GetTimeStr(1); // Include seconds
     97string strGross = FormatGrossWt(1);
     98
     99CTktFlds flds;
     100flds.Set(TKT_FLD_TIME, strTime);
     101flds.Set(TKT_FLD_GROSS, strGross);
     102PrintTkt(TKT_STD, flds);
     103}}}
     104