libwreport 2.1
Public Member Functions | Static Public Member Functions | Data Fields
wreport::CrexBulletin Struct Reference

CREX bulletin implementation. More...

#include <bulletin.h>

Inheritance diagram for wreport::CrexBulletin:
wreport::Bulletin

Public Member Functions

void clear ()
 Reset the bulletin.
virtual const char * encoding_name () const throw ()
 Type of source/target encoding.
virtual void load_tables ()
 Load a new set of tables to use for encoding this message.
virtual void decode_header (const std::string &raw, const char *fname="(memory)", size_t offset=0)
 Parse only the header of an encoded message.
virtual void decode (const std::string &raw, const char *fname="(memory)", size_t offset=0)
 Parse an encoded message.
virtual void encode (std::string &buf) const
 Encode the message.
virtual void print_details (FILE *out) const
 Print format-specific details.
virtual unsigned diff_details (const Bulletin &msg) const
 Diff format-specific details.

Static Public Member Functions

static bool read (FILE *in, std::string &buf, const char *fname=0, long *offset=0)
 Read an encoded BUFR message from a stream.
static void write (const std::string &buf, FILE *out, const char *fname=0)
 Write an encoded BUFR message to a stream.
static std::auto_ptr
< CrexBulletin
create ()
 To prevent breaking ABI if new members are added to bulletins, direct construction is discouraged in favour of an allocator function.

Data Fields

int table
 CREX-specific encoding options.
bool has_check_digit
 True if the CREX message uses the check digit feature.

Detailed Description

CREX bulletin implementation.


Member Function Documentation

virtual void wreport::CrexBulletin::decode ( const std::string &  buf,
const char *  fname = "(memory)",
size_t  offset = 0 
) [virtual]

Parse an encoded message.

Parameters:
bufThe buffer to decode
fnameThe file name to use for error messages
offsetThe offset inside the file of the start of the bulletin, used for error messages

Implements wreport::Bulletin.

virtual void wreport::CrexBulletin::decode_header ( const std::string &  buf,
const char *  fname = "(memory)",
size_t  offset = 0 
) [virtual]

Parse only the header of an encoded message.

Parameters:
bufThe buffer to decode
fnameThe file name to use for error messages
offsetThe offset inside the file of the start of the bulletin, used for error messages

Implements wreport::Bulletin.

static bool wreport::CrexBulletin::read ( FILE *  in,
std::string &  buf,
const char *  fname = 0,
long *  offset = 0 
) [static]

Read an encoded BUFR message from a stream.

Parameters:
inThe stream to read from
bufThe buffer where the data will be written
fnameFile name to use in error messages
Return values:
offsetThe offset in the file of the beginning of the BUFR data
Returns:
true if a message was found, false on EOF
static void wreport::CrexBulletin::write ( const std::string &  buf,
FILE *  out,
const char *  fname = 0 
) [static]

Write an encoded BUFR message to a stream.

Parameters:
bufThe buffer with the data to write
outThe stream to write to
fnameFile name to use in error messages

Field Documentation

CREX-specific encoding options.

Table version number


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