Public Member Functions | Public Attributes

fio_Alter_t Struct Reference
[Classes for large file i/o, relative file, and DataBase]

#include <fio_Alteration.h>

List of all members.

Public Member Functions

 fio_Alter_t ()
 fio_Alter_t (UInt16_t a_fileID, ivd_FilePosition_t a_filePosition, ivd_FileBufSize_t a_bufSize)
void Init (UInt16_t a_fileID, ivd_FilePosition_t a_filePosition, ivd_FileBufSize_t a_bufSize)
 ~fio_Alter_t ()
 fio_Alter_t (fio_JourHandle *m_jourHnd_p)
bool isValid ()
bool operator== (fio_Alter_t &a)
void Dump (ostream &os, int a_recSize, int a_offset)

Public Attributes

UInt16_t Prefix
UInt8_t version
UInt8_t fileID
ivd_FilePosition_t filePosition
ivd_FileBufSize_t bufSize
UInt16_t Suffix
 log_CLASSID_m

Detailed Description

Definition at line 58 of file fio_Alteration.h.


Constructor & Destructor Documentation

fio_Alter_t::fio_Alter_t (  )  [inline]

Definition at line 59 of file fio_Alteration.h.

{};

fio_Alter_t::fio_Alter_t ( UInt16_t  a_fileID,
ivd_FilePosition_t  a_filePosition,
ivd_FileBufSize_t  a_bufSize 
) [inline]

Definition at line 60 of file fio_Alteration.h.

        :
        Prefix(c_fio_AlterPrefix_d),
        version(fio_ALTER_T_version),
        fileID((UInt8_t)a_fileID),
        filePosition(a_filePosition),
        bufSize(a_bufSize),
        Suffix(c_fio_AlterSuffix_d)
    {
        // empty
    };

fio_Alter_t::~fio_Alter_t (  )  [inline]

Definition at line 87 of file fio_Alteration.h.

{};

fio_Alter_t::fio_Alter_t ( fio_JourHandle m_jourHnd_p  ) 

Definition at line 66 of file fio_Alteration.cpp.

References ie_NOT_ALTER_T, isValid(), ivd_Error, fio_JourHandle::JourRead(), and len.

                                                     {
    unsigned int len = m_jourHnd_p->JourRead(this, sizeof(fio_Alter_t));

    if (!isValid()
        || len != sizeof(fio_Alter_t)) {
        throw ivd_Error(ie_NOT_ALTER_T, "", false);
    }
}

Here is the call graph for this function:


Member Function Documentation

void fio_Alter_t::Dump ( ostream &  os,
int  a_recSize,
int  a_offset 
)

Definition at line 100 of file fio_Alteration.cpp.

References bufSize, c_fio_maxRelFileHeadLen, fileID, and filePosition.

Referenced by fio_JourFile::Dump().

                                                               {    
    os << setw(5) << int(fileID) << setw(10);
    if (a_recSize == 0) {
        os << "   IDX = ???? Size is not specified." << int(fileID);
    }
    else {
        if (filePosition < a_offset) {
            os << (filePosition - c_fio_maxRelFileHeadLen) / sizeof(fio_uvListHeader_t)
               << "H";
        }
        else {
            os << (filePosition - a_offset) / a_recSize << "R";
        }
    }  
    os << setw(10) << filePosition;
    os << setw(10) << bufSize  << '\n';
}

Here is the caller graph for this function:

void fio_Alter_t::Init ( UInt16_t  a_fileID,
ivd_FilePosition_t  a_filePosition,
ivd_FileBufSize_t  a_bufSize 
) [inline]

Definition at line 75 of file fio_Alteration.h.

References bufSize, c_fio_AlterSuffix_d, fileID, filePosition, Prefix, Suffix, and version.

Referenced by fio_AlterJourBlock::Insert().

    {
        Prefix  = c_fio_AlterPrefix_d,
        version = fio_ALTER_T_version,
        fileID  = (UInt8_t)a_fileID,
        filePosition = a_filePosition,
        bufSize = a_bufSize,
        Suffix  = c_fio_AlterSuffix_d;
    };

Here is the caller graph for this function:

bool fio_Alter_t::isValid (  ) 

Definition at line 77 of file fio_Alteration.cpp.

References bufSize, c_fio_AlterPrefix_d, c_fio_AlterSuffix_d, fileID, filePosition, fio_ALTER_T_version, Prefix, Suffix, and version.

Referenced by fio_Alter_t().

                          { return (  (fileID       > 0)
                        && (version   == fio_ALTER_T_version)
                        && (filePosition > 0)
                        && (bufSize      > 0)
                        && (Prefix == c_fio_AlterPrefix_d)
                        && (Suffix == c_fio_AlterSuffix_d)
                        );
}

Here is the caller graph for this function:

bool fio_Alter_t::operator== ( fio_Alter_t a  ) 

Definition at line 88 of file fio_Alteration.cpp.

References bufSize, fileID, filePosition, Prefix, Suffix, and version.

                                            {
    return  (  (fileID       == a.fileID)
            && (version      == a.version)
            && (filePosition == a.filePosition)
            && (bufSize      == a.bufSize)
            && (Prefix       == a.Prefix)
            && (Suffix       == a.Suffix)
            );
}


Member Data Documentation

Definition at line 101 of file fio_Alteration.h.

Definition at line 94 of file fio_Alteration.h.

Referenced by Init(), isValid(), and operator==().

Definition at line 99 of file fio_Alteration.h.

Referenced by Init(), isValid(), and operator==().

Definition at line 95 of file fio_Alteration.h.

Referenced by Init(), isValid(), and operator==().


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