Public Member Functions | Public Attributes | Friends

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

#include <fio_Transaction.h>

List of all members.

Public Member Functions

 fio_EndTransaction_t ()
 fio_EndTransaction_t (ivd_TransNumber_t a_transNumber)
void Init (fio_JourHandle &m_jourHnd_p)
bool operator== (fio_EndTransaction_t a)

Public Attributes

UInt16_t Prefix
ivd_TransNumber_t TransNumber
 log_CLASSID_m

Friends

ostream & operator<< (ostream &a_os, fio_EndTransaction_t &a_endTrans)

Detailed Description

Definition at line 72 of file fio_Transaction.h.


Constructor & Destructor Documentation

fio_EndTransaction_t::fio_EndTransaction_t (  )  [inline]

Definition at line 73 of file fio_Transaction.h.

{};

fio_EndTransaction_t::fio_EndTransaction_t ( ivd_TransNumber_t  a_transNumber  ) 

Definition at line 65 of file fio_Transaction.cpp.

            : 
            Prefix(c_fio_EndTransPrefix),
            TransNumber(a_transNumber)
{
    // Empty
}


Member Function Documentation

void fio_EndTransaction_t::Init ( fio_JourHandle m_jourHnd_p  ) 

Definition at line 76 of file fio_Transaction.cpp.

References c_fio_EndTransPrefix, ie_NOT_ENDTRANS_T, ivd_Error, fio_JourHandle::JourRead(), len, Prefix, and fio_JourHandle::ResetPosition().

Referenced by fio_JourFile::Dump(), and fio_Transaction::ReadTransactionFromLog().

                                                         {
    unsigned int len = a_jourHnd.JourRead(this, sizeof(fio_EndTransaction_t));

    if (  (len     == sizeof(fio_EndTransaction_t))
       && (Prefix  == c_fio_EndTransPrefix) ) {
        // empty
    }
    else { // len > sizeof(Prefix) + sizeof(Version) && ...
        a_jourHnd.ResetPosition(); //  revert position
        throw ivd_Error(ie_NOT_ENDTRANS_T, "", false);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool fio_EndTransaction_t::operator== ( fio_EndTransaction_t  a  ) 

Definition at line 91 of file fio_Transaction.cpp.

References Prefix, and TransNumber.

                                                              {
    return  ( 
              (Prefix      == a.Prefix) 
            &&(TransNumber == a.TransNumber) );
}


Friends And Related Function Documentation

ostream& operator<< ( ostream &  a_os,
fio_EndTransaction_t a_endTrans 
) [friend]

Definition at line 99 of file fio_Transaction.cpp.

                                                                {
//    string pref(a_et.Prefix, 2);
    a_os << "*** END Transaction Record\n";
    a_os << "Prefix=" << hex << a_et.Prefix  << dec << '\n';
    a_os << "Number=" << a_et.TransNumber           << '\n'; 
    a_os << "*** End Of ETR\n";
    return a_os;
}


Member Data Documentation

Definition at line 83 of file fio_Transaction.h.

Definition at line 80 of file fio_Transaction.h.

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

Definition at line 81 of file fio_Transaction.h.

Referenced by operator<<(), fio_StartTransaction_t::operator==(), and operator==().


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