Public Member Functions | Public Attributes | Private Attributes

log_FileID Class Reference
[File, class and function identification]

Helper class for file identification. More...

#include <logid.h>

List of all members.

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.

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.


Constructor & Destructor Documentation

log_FileID::log_FileID (  ) 

Default constructor.

Definition at line 46 of file log_fileid.cpp.

                       {
    // empty
}

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 50 of file log_fileid.cpp.

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

{

    const UInt32_t authTokLen_c = 9; // "$Author: "
    size_t  len = strlen(a_author);
    if (len > (authTokLen_c+2)) { 
        m_author = string(a_author + authTokLen_c, len - (authTokLen_c+2));
    }
    else {
        m_author = string(a_author);
    }

    const UInt32_t dateTokLen_c = 7; // "$Date: "
    len = strlen(a_date);
    if (len > (dateTokLen_c+2)) {
        m_date = string(a_date + dateTokLen_c, len - (dateTokLen_c+2));
    }
    else {
        m_date = string(a_date);
    }

    const UInt32_t fileTokLen_c = 10; // "$RCSfile: "
    len = strlen(a_file);
    if (len > (fileTokLen_c+2)) {
        m_file = string(a_file + fileTokLen_c, len - (fileTokLen_c+2));
    }
    else {
        m_file = string(a_file);
    }

    const UInt32_t revTokLen_c = 11; // "$Revision: "
    len = strlen(a_revision);
    if (len > (revTokLen_c+2)) {
        m_revision = string(a_revision + revTokLen_c, len - (revTokLen_c+2));
    }
    else {
        m_revision = string(a_revision);
    }

    const UInt32_t pathTokLen_c = 9; // "$Source: "
    len = strlen(a_fullPath);
    if (len > (pathTokLen_c+2)) {
        m_fullPath = string(a_fullPath + pathTokLen_c, len - (pathTokLen_c+2));
    }
    else {
        m_fullPath = string(a_fullPath);
    }
}

log_FileID::~log_FileID (  )  [virtual]

Definition at line 104 of file log_fileid.cpp.

                        {
    // empty
}


Member Data Documentation

Macro for class name member.

Definition at line 74 of file logid.h.

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().


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