Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Newsgroup Class Reference

#include <Newsgroup.h>

Inheritance diagram for Newsgroup:

NVNewsgroup RNewsgroup CNewsgroup List of all members.

Public Member Functions

 Newsgroup (OverviewFmt *fmt, const char *name)
virtual ~Newsgroup ()
void setoverviewfmt (OverviewFmt *fmt)
OverviewFmtgetoverviewfmt ()
const char * name (void)
virtual void getsize (unsigned int *f, unsigned int *l)=0
virtual void setsize (unsigned int f, unsigned int l)=0
virtual unsigned int firstnbr ()=0
virtual unsigned int lastnbr ()=0
virtual int hasrecord (unsigned int i)=0
virtual Articlegetarticle (unsigned int nbr)=0
virtual void freearticle (Article *artp)=0
virtual void setarticle (Article *art)=0
virtual void printarticle (std::ostream &os, unsigned int nbr)=0
virtual void prefetchGroup (int lockgrp=1)=0
virtual void prefetchOverview (void)=0
virtual const char * getover (unsigned int nbr)=0
virtual void setover (const string &over)=0
virtual void printover (std::ostream &os, unsigned int nbr)
virtual void readoverdb (std::istream &is)=0
virtual void printoverdb (std::ostream &os, unsigned int f=0, unsigned int l=UINT_MAX)
virtual void printheaderdb (std::ostream &os, const char *header, unsigned int f=0, unsigned int l=UINT_MAX)=0
virtual void printlistgroup (std::ostream &os)=0

Protected Member Functions

virtual Articleretrievearticle (unsigned int nbr)

Protected Attributes

char _NewsgroupName [MAXGROUPNAMELEN+1]
OverviewFmt_OverviewFormat

Constructor & Destructor Documentation

Newsgroup::Newsgroup OverviewFmt fmt,
const char *  name
[inline]
 

Definition at line 37 of file Newsgroup.h.

References _NewsgroupName, _OverviewFormat, ASSERT, MAXGROUPNAMELEN, and slog.

00037                                                         {
00038                 _OverviewFormat = fmt;
00039                 _NewsgroupName[MAXGROUPNAMELEN] = '\0';
00040                 strncpy(_NewsgroupName, name, MAXGROUPNAMELEN);
00041                 ASSERT(if (strlen(name) > MAXGROUPNAMELEN) {
00042                        slog.
00043                        p(Logger::
00044                          Error) <<
00045                        "Name of newsgroup too long - truncated\n";}
00046                 );
00047         }

Newsgroup::~Newsgroup  )  [virtual]
 

Definition at line 3 of file Newsgroup.cc.

00004 {
00005 }


Member Function Documentation

virtual unsigned int Newsgroup::firstnbr  )  [pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

virtual void Newsgroup::freearticle Article artp  )  [pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

Referenced by ns_article().

virtual Article* Newsgroup::getarticle unsigned int  nbr  )  [pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

Referenced by ns_article().

virtual const char* Newsgroup::getover unsigned int  nbr  )  [pure virtual]
 

Implemented in CNewsgroup, NVNewsgroup, and RNewsgroup.

Referenced by ns_lastnext(), ns_stat(), printover(), and printoverdb().

OverviewFmt* Newsgroup::getoverviewfmt  )  [inline]
 

Definition at line 53 of file Newsgroup.h.

References _OverviewFormat.

00053                                       {
00054                 return _OverviewFormat;
00055         }

virtual void Newsgroup::getsize unsigned int *  f,
unsigned int *  l
[pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

Referenced by ns_lastnext(), and printoverdb().

virtual int Newsgroup::hasrecord unsigned int  i  )  [pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

virtual unsigned int Newsgroup::lastnbr  )  [pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

const char* Newsgroup::name void   )  [inline]
 

Definition at line 61 of file Newsgroup.h.

References _NewsgroupName.

Referenced by CServer::overviewdb(), and CNewsgroup::sUpdateOverview().

00061                                {
00062                 return _NewsgroupName;
00063         }

virtual void Newsgroup::prefetchGroup int  lockgrp = 1  )  [pure virtual]
 

Implemented in CNewsgroup, NVNewsgroup, and RNewsgroup.

virtual void Newsgroup::prefetchOverview void   )  [pure virtual]
 

Implemented in CNewsgroup, NVNewsgroup, and RNewsgroup.

Referenced by doprefetch().

virtual void Newsgroup::printarticle std::ostream &  os,
unsigned int  nbr
[pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

virtual void Newsgroup::printheaderdb std::ostream &  os,
const char *  header,
unsigned int  f = 0,
unsigned int  l = UINT_MAX
[pure virtual]
 

Implemented in CNewsgroup, NVNewsgroup, and RNewsgroup.

Referenced by ns_xover().

virtual void Newsgroup::printlistgroup std::ostream &  os  )  [pure virtual]
 

Implemented in CNewsgroup, NVNewsgroup, and RNewsgroup.

Referenced by ns_listgroup().

virtual void Newsgroup::printover std::ostream &  os,
unsigned int  nbr
[inline, virtual]
 

Reimplemented in CNewsgroup, and NVNewsgroup.

Definition at line 80 of file Newsgroup.h.

References getover().

00080                                                                   {
00081                 const char *o = getover(nbr);
00082                 if (o)
00083                         os << o << "\r\n";
00084         }

virtual void Newsgroup::printoverdb std::ostream &  os,
unsigned int  f = 0,
unsigned int  l = UINT_MAX
[inline, virtual]
 

Reimplemented in CNewsgroup, and NVNewsgroup.

Definition at line 86 of file Newsgroup.h.

References getover(), and getsize().

Referenced by ns_xover().

00087                                                                {
00088                 unsigned int i, ol;
00089                 const char *o;
00090                 getsize(&i, &ol);
00091                 if (f > i)
00092                         i = f;
00093                 if (l > ol)
00094                         l = ol;
00095                 while (i <= l) {
00096                         if ((o = getover(i++)) != NULL)
00097                                 os << o << "\r\n";
00098                 }
00099         }

virtual void Newsgroup::readoverdb std::istream &  is  )  [pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

virtual Article* Newsgroup::retrievearticle unsigned int  nbr  )  [inline, protected, virtual]
 

Reimplemented in CNewsgroup.

Definition at line 34 of file Newsgroup.h.

Referenced by NVNewsgroup::getarticle(), and NVNewsgroup::printarticle().

00034                                                            {
00035                 return NULL;
00036       } public:

virtual void Newsgroup::setarticle Article art  )  [pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

virtual void Newsgroup::setover const string &  over  )  [pure virtual]
 

Implemented in NVNewsgroup, and RNewsgroup.

void Newsgroup::setoverviewfmt OverviewFmt fmt  )  [inline]
 

Definition at line 50 of file Newsgroup.h.

References _OverviewFormat.

00050                                                {
00051                 _OverviewFormat = fmt;
00052         }

virtual void Newsgroup::setsize unsigned int  f,
unsigned int  l
[pure virtual]
 

Implemented in CNewsgroup, NVNewsgroup, and RNewsgroup.

Referenced by selectgroup().


Member Data Documentation

char Newsgroup::_NewsgroupName[MAXGROUPNAMELEN + 1] [protected]
 

Definition at line 32 of file Newsgroup.h.

Referenced by name(), and Newsgroup().

OverviewFmt* Newsgroup::_OverviewFormat [protected]
 

Definition at line 33 of file Newsgroup.h.

Referenced by getoverviewfmt(), Newsgroup(), and setoverviewfmt().


The documentation for this class was generated from the following files:
Generated on Fri Aug 20 10:58:10 2004 for NewsCache by doxygen 1.3.6-20040222