Logo Search packages:      
Sourcecode: pan version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes

pan::Article Class Reference
[Backend Interfaces]

#include <article.h>

Collaboration diagram for pan::Article:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< Quarkmid_sequence_t
typedef Parts::const_iterator part_iterator
enum  PartState { SINGLE, INCOMPLETE, COMPLETE }

Public Member Functions

bool add_part (Parts::number_t num, const StringView &mid, Parts::bytes_t bytes)
void clear ()
unsigned long get_byte_count () const
unsigned int get_crosspost_count () const
Parts::number_t get_found_part_count () const
unsigned long get_line_count () const
bool get_part_info (Parts::number_t num, std::string &mid, Parts::bytes_t &bytes) const
mid_sequence_t get_part_mids () const
PartState get_part_state () const
Parts::number_t get_total_part_count () const
bool is_byte_count_ge (unsigned long test) const
bool is_line_count_ge (size_t test) const
part_iterator pbegin () const
part_iterator pend () const
void set_part_count (Parts::number_t num)
void set_parts (const PartBatch &b)

Static Public Member Functions

static bool has_reply_leader (const StringView &)

Public Attributes

Quark author
bool is_binary
unsigned int lines
Quark message_id
int score
Quark subject
time_t time_posted
Xref xref

Private Attributes

Parts parts

Detailed Description

A Usenet article, either single-part or multipart.

To lessen the memory footprint of large binaries groups, Pan folds multipart posts into a single Article object. Only minimal information for any one part is kept (message-id, line count, byte count), and the Article object holds the rest.

This is a lossy approach: less-important unique fields, such as the part's xref and time-posted, are not needed and so we don't keep them.

Definition at line 47 of file article.h.


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

Generated by  Doxygen 1.6.0   Back to index