dumont Namespace Reference


Functions

QString dq (QString v_string)
QString prependZero (QString i_string, int i_count)
QString var (QString v_var, QString v_fld)
 Get a var Value.
QString var (QString v_var, QString v_fld, QString v_val)
 Set a var value.
QString delVar (QString v_var, QString v_fld)
 Delete a var.
QString packDate (QDate i_date)
QString packTime (QTime i_time)
QString packDateTime (QDateTime i_dateTime)
 Pack the Date/Time.
QString packDateTime (QDate i_date, QTime i_time)
QString unpackDateTime (QString i_packedDateTime)
QString guid (void)
QString formatText (QString i_preText, QString i_text, QString i_postText)
QString formatOLtext (QString i_text)
QString formatOLdate (QDateTime i_dateTimeIn)
QString formatOLdate (QDate i_dateIn)
QString formatOLurl (QString i_filePath)
QString formatOLics (QString i_organizerEmail, QString i_summary, QDateTime i_dateStart, QDateTime i_dateEnd, QString i_location, QString i_uid, QString i_desc)
QString fixCase (QString i_value)
QString fixPhone (QString i_value)
bool phoneTooShort (void)
static void output (const char *sz)
void Trout (QString v_leader, QString v_file, QString v_line, QString v_msg)
 Format a message for the output window.
void Trout (QString v_leader, QString v_file, int v_line, QString v_msg)
 Format a message with numeric line number for the output window.
void Trin (QString v_file, int v_line, QString v_msg)
 TraceOn function - mark the beginning of a function.
void Trac (QString v_file, int v_line, QString v_msg)
void Trac (QString v_file, QString v_line, QString v_msg)
void Trot (QString v_file, int v_line, QString v_msg)
void ErrorMessage (HRESULT hr)
QString vbString (QString i_string)
void dumpString (const QString &i_string)
 Dump a string binary to debug.

Variables

static bool m_phoneTooShort
int m_tracDepth = 0
 Run-time trace depth.
int m_tracLevel = 0
 Requested Trace Level (higher value == more messages).
QTextEdit * m_tracWin = NULL
 Message Output Window.

Function Documentation

QString dumont::delVar ( QString  v_var,
QString  v_fld 
)

Delete a var.

! This removes a varValue from a long string. In some cases it is preferrable to remove any reference to the varValue, and setting the value to "" results in a "varName=" field remaining in the varString.

Definition at line 121 of file util.cpp.

QString dumont::dq ( QString  v_string  ) 

Definition at line 56 of file util.cpp.

void dumont::dumpString ( const QString &  i_string  ) 

Dump a string binary to debug.

This takes an input string and dumps it to the debug window in a ascii/binary form that makes it possible to examine the internals of the string. This is useful for doing things like determining the contents of a string, including non-printable imbedded characters like vbCrLf.

Example Output
   dumDLL.dumpString dumFRM.toXml("*")

 0000: 3c 21 44 4f 43 54 59 50 45 20 51 43 6f 6d 6d 65  <!DOCTYPE QComme
 0010: 6e 63 65 46 6f 72 6d 3e 0d 0a 3c 69 74 65 6d 20  nceForm>..<item 
 0020: 66 6f 72 6d 4e 61 6d 65 3d 22 44 75 6d 6f 6e 74  formName="Dumont
 0030: 22 20 63 61 74 65 67 6f 72 79 4e 61 6d 65 3d 22  " categoryName="
 0040: 44 75 6d 6f 6e 74 22 20 69 74 65 6d 4e 61 6d 65  Dumont" itemName
 0050: 3d 22 74 65 73 74 22 20 69 74 65 6d 43 6c 61 72  ="test" itemClar
 0060: 69 66 79 3d 22 22 20 3e 0d 0a 20 20 20 3c 66 69  ify="" >..   <fi
 0070: 65 6c 64 30 20 6e 61 6d 65 3d 22 4e 61 6d 65 22  eld0 name="Name"
 0080: 20 3e 74 65 73 74 3c 2f 66 69 65 6c 64 30 3e 0d   >test</field0>.
 0090: 0a 20 20 20 3c 66 69 65 6c 64 31 20 6e 61 6d 65  .   <field1 name

Definition at line 574 of file util.cpp.

void dumont::ErrorMessage ( HRESULT  hr  ) 

Definition at line 539 of file util.cpp.

QString dumont::fixCase ( QString  i_value  ) 

Definition at line 299 of file util.cpp.

QString dumont::fixPhone ( QString  i_value  ) 

Definition at line 316 of file util.cpp.

QString dumont::formatOLdate ( QDate  i_dateIn  ) 

Definition at line 227 of file util.cpp.

QString dumont::formatOLdate ( QDateTime  i_dateTimeIn  ) 

Definition at line 222 of file util.cpp.

QString dumont::formatOLics ( QString  i_organizerEmail,
QString  i_summary,
QDateTime  i_dateStart,
QDateTime  i_dateEnd,
QString  i_location,
QString  i_uid,
QString  i_desc 
)

Definition at line 244 of file util.cpp.

QString dumont::formatOLtext ( QString  i_text  ) 

Definition at line 212 of file util.cpp.

QString dumont::formatOLurl ( QString  i_filePath  ) 

Definition at line 232 of file util.cpp.

QString dumont::formatText ( QString  i_preText,
QString  i_text,
QString  i_postText 
)

Definition at line 207 of file util.cpp.

QString dumont::guid ( void   ) 

Definition at line 201 of file util.cpp.

static void dumont::output ( const char *  sz  )  [inline, static]

Definition at line 445 of file util.cpp.

QString dumont::packDate ( QDate  i_date  ) 

Definition at line 131 of file util.cpp.

QString dumont::packDateTime ( QDate  i_date,
QTime  i_time 
)

Definition at line 175 of file util.cpp.

QString dumont::packDateTime ( QDateTime  i_dateTime  ) 

Pack the Date/Time.

! This converts a QDateTime value into a packed field with no punctuation. This is intended for TimeDate stamping in category row items, and the punctuation is removed to reduce the possibility of processing errors and to standardize the format across system-wide regional time/date formatting settings.

Parameters:
i_dateTime The QDateTime value to pack
Return values:
QString Packed DateTime value
 The format for the field is: 
  YYYYMMDDHHNNSS
  +---+-+-+-+-+-
  |   | | | | |
  |   | | | | +-- seconds (prepend zero)
  |   | | | +---- minute (prepend zero)
  |   | | +------ hour (prepend zero)
  |   | +-------- day of month (prepend zero)
  |   +---------- month (prepend zero)
  +-------------- full (4 digit) year

Definition at line 166 of file util.cpp.

QString dumont::packTime ( QTime  i_time  ) 

Definition at line 136 of file util.cpp.

bool dumont::phoneTooShort ( void   ) 

Definition at line 375 of file util.cpp.

QString dumont::prependZero ( QString  i_string,
int  i_count 
)

Definition at line 61 of file util.cpp.

void dumont::Trac ( QString  v_file,
QString  v_line,
QString  v_msg 
)

Definition at line 522 of file util.cpp.

void dumont::Trac ( QString  v_file,
int  v_line,
QString  v_msg 
)

Definition at line 515 of file util.cpp.

void dumont::Trin ( QString  v_file,
int  v_line,
QString  v_msg 
)

TraceOn function - mark the beginning of a function.

Parameters:
v_file Source fileName being traced
v_line Source LineNumber being traced
v_msg Message to include

Definition at line 505 of file util.cpp.

void dumont::Trot ( QString  v_file,
int  v_line,
QString  v_msg 
)

Definition at line 529 of file util.cpp.

void dumont::Trout ( QString  v_leader,
QString  v_file,
int  v_line,
QString  v_msg 
)

Format a message with numeric line number for the output window.

Parameters:
v_leader Message line prefix
v_file Source file name
v_line Source Line number
v_msg Message to include
This is a convenience function that accepts the __LINE__ macro as a parameter to the line number. The line number is converted to a QString and control is passed to Trout(s,s,s,s);

Definition at line 491 of file util.cpp.

void dumont::Trout ( QString  v_leader,
QString  v_file,
QString  v_line,
QString  v_msg 
)

Format a message for the output window.

Parameters:
v_leader QString of message line prefix
v_file QString of the file name
v_line QString of the line number
v_msg QString of the message to include

Definition at line 460 of file util.cpp.

QString dumont::unpackDateTime ( QString  i_packedDateTime  ) 

Definition at line 185 of file util.cpp.

QString dumont::var ( QString  v_var,
QString  v_fld,
QString  v_val 
)

Set a var value.

! This sets a varValue in a long string. The string will be coded with \r\n (vbCrLf) characters seperating each line of varValue. The varValue fields contains the format varName=varValue common in most .ini files.

Definition at line 97 of file util.cpp.

QString dumont::var ( QString  v_var,
QString  v_fld 
)

Get a var Value.

! This pulls a varValue from a long string. The string is assumed to have encoded \r\n (vbCrLf) characters seperating each line of varValue. The varValue fields contains the format varName=varValue common in most .ini files.

Definition at line 78 of file util.cpp.

QString dumont::vbString ( QString  i_string  ) 

Definition at line 564 of file util.cpp.


Variable Documentation

bool dumont::m_phoneTooShort [static]

Definition at line 297 of file util.cpp.

Run-time trace depth.

The TraceDepth represents the run-time module depth as the application is running. Various modules can increment the m_traceDepth at their discretion, and then should decrement the m_traceDepth at the end of their process path. The Trace Depth is compared against the requested TraceLevel (m_traceLevel), and if the requested trace level is greater than the current depth, a message is displayed.

Definition at line 398 of file util.cpp.

Requested Trace Level (higher value == more messages).

The TraceLevel is the requested trace level. This is initialized to zero, indicating no trace is requested. As the application runs, the m_traceDepth is incremented. If the m_traceLevel is higher then the current depth, then debug messages are sent to the appropriate console terminal.

Definition at line 410 of file util.cpp.

QTextEdit* dumont::m_tracWin = NULL

Message Output Window.

This is some form of a textEdit window. It needs to be set up by the hosting application in order to get messages to appear on it. If it's left NULL then no trac messages will be developed, formatted or sent.

Definition at line 421 of file util.cpp.





~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com