log_FileID Class Reference
[File, class and function identification]

#include <logid.h>

List of all members.


Detailed Description

Helper class for file identification.

This class is used by macro log_SETFILE_m(). Macro uses CVS identifiers that are stored in the class' members.

See also:
log_SETFILE_m

Definition at line 50 of file logid.h.


Public Member Functions

 log_FileID ()
 Default constructor.
 log_FileID (const char *a_author, const char *a_date, const char *a_file, const char *a_revision, const char *a_fullPath)
virtual ~log_FileID ()

Public Attributes

string m_author
string m_date
string m_file
string m_revision
string m_fullPath

Private Attributes

 log_CLASSID_m
 Macro for class name member.

Constructor & Destructor Documentation

log_FileID::log_FileID (  ) 

Default constructor.

Definition at line 32 of file log_fileid.cpp.

00032                        {
00033     // empty
00034 }

log_FileID::log_FileID ( const char *  a_author,
const char *  a_date,
const char *  a_file,
const char *  a_revision,
const char *  a_fullPath 
)

Definition at line 36 of file log_fileid.cpp.

References len, m_author, m_date, m_file, m_fullPath, and m_revision.

00042 {
00043 
00044     const UInt32_t authTokLen_c = 9; // "$Author: "
00045     size_t  len = strlen(a_author);
00046     if (len > (authTokLen_c+2)) { 
00047         m_author = string(a_author + authTokLen_c, len - (authTokLen_c+2));
00048     }
00049     else {
00050         m_author = string(a_author);
00051     }
00052 
00053     const UInt32_t dateTokLen_c = 7; // "$Date: "
00054     len = strlen(a_date);
00055     if (len > (dateTokLen_c+2)) {
00056         m_date = string(a_date + dateTokLen_c, len - (dateTokLen_c+2));
00057     }
00058     else {
00059         m_date = string(a_date);
00060     }
00061 
00062     const UInt32_t fileTokLen_c = 10; // "$RCSfile: "
00063     len = strlen(a_file);
00064     if (len > (fileTokLen_c+2)) {
00065         m_file = string(a_file + fileTokLen_c, len - (fileTokLen_c+2));
00066     }
00067     else {
00068         m_file = string(a_file);
00069     }
00070 
00071     const UInt32_t revTokLen_c = 11; // "$Revision: "
00072     len = strlen(a_revision);
00073     if (len > (revTokLen_c+2)) {
00074         m_revision = string(a_revision + revTokLen_c, len - (revTokLen_c+2));
00075     }
00076     else {
00077         m_revision = string(a_revision);
00078     }
00079 
00080     const UInt32_t pathTokLen_c = 9; // "$Source: "
00081     len = strlen(a_fullPath);
00082     if (len > (pathTokLen_c+2)) {
00083         m_fullPath = string(a_fullPath + pathTokLen_c, len - (pathTokLen_c+2));
00084     }
00085     else {
00086         m_fullPath = string(a_fullPath);
00087     }
00088 }

log_FileID::~log_FileID (  )  [virtual]

Definition at line 90 of file log_fileid.cpp.

00090                         {
00091     // empty
00092 }


Member Data Documentation

Definition at line 66 of file logid.h.

Referenced by log_FileID().

Definition at line 67 of file logid.h.

Referenced by log_FileID().

Definition at line 70 of file logid.h.

Referenced by log_FileID().

Macro for class name member.

Definition at line 74 of file logid.h.


The documentation for this class was generated from the following files:

Generated on Mon Feb 27 19:42:53 2012 for OPENARCHIVE by  doxygen 1.5.6