Remote Access Control


HEXFile Class Reference

#include <hexfile.h>


Detailed Description

This class contains all records of a HEX file.

Definition at line 96 of file hexfile.h.

Public Member Functions

void Add (const HEXRecord &record, size_t copies)
void Add (const HEXRecord &record)
 HEXFile ()
void Print (std::ostream &os) const
 ~HEXFile ()

Private Attributes

unsigned long m_nextAddress
std::vector< HEXRecordm_records


Constructor & Destructor Documentation

HEXFile::HEXFile (  )  [inline]

Default ctor.

Definition at line 104 of file hexfile.h.

00104 : m_nextAddress( 0 ) {}

HEXFile::~HEXFile (  )  [inline]

Definition at line 105 of file hexfile.h.

00105 {}


Member Function Documentation

void HEXFile::Add ( const HEXRecord record,
size_t  copies 
) [inline]

Add several records to the end of the file.

Definition at line 114 of file hexfile.h.

References Add().

00114                                                             {
00115                 while( copies-- ) {
00116                         Add( record );
00117                 }
00118         }

Here is the call graph for this function:

void HEXFile::Add ( const HEXRecord record  )  [inline]

Add one record to the end of the file.

Definition at line 108 of file hexfile.h.

References HEXRecord::GetByteCount(), m_nextAddress, and m_records.

Referenced by Add(), and operator<<().

00108                                              {
00109                 m_records.push_back( record );
00110                 m_records.back().SetAddress( m_nextAddress );
00111                 m_nextAddress += record.GetByteCount();
00112         }

Here is the call graph for this function:

void HEXFile::Print ( std::ostream &  os  )  const

Print whole file to an output stream.

Definition at line 140 of file hexfile.cpp.

References m_records.

Referenced by operator<<().

00141 {
00142         for( size_t idx = 0; idx < m_records.size(); ++idx ) {
00143                 os << m_records.at( idx );
00144         }
00145         os << ":00000001ff" << std::endl;
00146 }


Field Documentation

unsigned long HEXFile::m_nextAddress [private]

Start address to be used for the next added record.

Definition at line 100 of file hexfile.h.

Referenced by Add().

std::vector< HEXRecord > HEXFile::m_records [private]

Container for the records.

Definition at line 99 of file hexfile.h.

Referenced by Add(), and Print().

@DOC_TITLE@
Generated on Fri Aug 8 11:02:27 2008 for AVR411 Secure Rolling Code Algorithm (PC Tools - createrxhex) by doxygen 1.4.7