ArtsPortChooser


[ libArts | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

DESCRIPTION

Class Summary

class ArtsPortChooser

{

public:
ArtsPortChooser();
uint16_t AddPort(uint16_t port);
bool Matches(uint16_t port) const;
vector<ArtsPortChoice> & PortChoices() const ;
uint32_t Length(uint8_t version ) const;
istream & read(istream & is);
int read(int fd);
ostream & write(ostream & os) const;
int write(int fd) const;
bool operator == (const ArtsPortChooser & portChooser) const;
friend ostream & operator << (ostream& os, const ArtsPortChooser & portChooser);
protected:
}; // ArtsPortChooser

Back to the top of ArtsPortChooser


DESCRIPTION


---------------------------------------------------------------------------
class ArtsPortChooser
---------------------------------------------------------------------------
This class abstracts a port chooser, which permits selection of a number of ports by range and by singular value. This is really just a wrapper around a vector of ArtsPortChoice objects.
---------------------------------------------------------------------------

Back to the top of ArtsPortChooser


ArtsPortChooser();


-------------------------------------------------------------------------
ArtsPortChooser()
.........................................................................
constructor
-------------------------------------------------------------------------

  ArtsPortChooser();

Back to the top of ArtsPortChooser


uint16_t AddPort(uint16_t port);


-------------------------------------------------------------------------
uint16_t AddPort(uint16_t port)
.........................................................................
Adds a single port value to the chooser. Returns the port value.
-------------------------------------------------------------------------

  uint16_t AddPort(uint16_t port);

Back to the top of ArtsPortChooser


bool Matches(uint16_t port) const;


-------------------------------------------------------------------------
bool Matches(uint16_t port) const
.........................................................................
Returns true if port is in our port chooser (in a range or matching one of our signel port values), else returns false.
-------------------------------------------------------------------------

  bool Matches(uint16_t port) const;

Back to the top of ArtsPortChooser


vector<ArtsPortChoice> & PortChoices() const ;


-------------------------------------------------------------------------
inline vector<ArtsPortChoice> & PortChoices() const
.........................................................................
Returns a reference to the vector of port choices.
-------------------------------------------------------------------------

  inline vector<ArtsPortChoice> & PortChoices() const
                                       
;

Function is currently defined inline.


Back to the top of ArtsPortChooser


uint32_t Length(uint8_t version ) const;


-------------------------------------------------------------------------
uint32_t Length(uint8_t version = 0) const;
.........................................................................
Returns the length (in bytes) required to store the ArtsPortChooser object on disk.
-------------------------------------------------------------------------

  uint32_t Length(uint8_t version = 0) const;

Back to the top of ArtsPortChooser


istream & read(istream & is);


-------------------------------------------------------------------------
istream & read(istream & is)
.........................................................................
Reads the contents of a port chooser from an istream. Returns the istream.
-------------------------------------------------------------------------

  istream & read(istream & is);

Back to the top of ArtsPortChooser


int read(int fd);


-------------------------------------------------------------------------
int read(int fd)
.........................................................................
Reads the contents of a port chooser from a file descriptor. Returns the number of bytes read on success, -1 on failure.
-------------------------------------------------------------------------

  int read(int fd);

Back to the top of ArtsPortChooser


ostream & write(ostream & os) const;


-------------------------------------------------------------------------
ostream & write(ostream & os) const
.........................................................................
Writes the contents of a port chooser to an ostream. Returns the ostream.
-------------------------------------------------------------------------

  ostream & write(ostream & os) const;

Back to the top of ArtsPortChooser


int write(int fd) const;


-------------------------------------------------------------------------
int write(int fd) const
.........................................................................
Writes the contents of a port chooser to a file descriptor. Returns the number of bytes written on success, -1 on failure.
-------------------------------------------------------------------------

  int write(int fd) const;

Back to the top of ArtsPortChooser


bool operator == (const ArtsPortChooser & portChooser) const;


-------------------------------------------------------------------------
bool operator == (const ArtsPortChooser & portChooser) const
.........................................................................
Compares two ArtsPortChooser objects, independent of the order of their port choices. It uses sort(), unique() and the vector == operator to do this.
-------------------------------------------------------------------------

  bool operator == (const ArtsPortChooser & portChooser) const;

Back to the top of ArtsPortChooser


friend ostream & operator << (ostream& os, const ArtsPortChooser & portChooser);


-------------------------------------------------------------------------
friend ostream & operator << (ostream& os, const ArtsPortChooser & portChooser)
.........................................................................
Overloaded ostream << operator to dump to an ostream in human-readable form.
-------------------------------------------------------------------------

  friend ostream & operator << (ostream& os,
                                const ArtsPortChooser & portChooser);

Back to the top of ArtsPortChooser


All Members

public:
uint16_t AddPort(uint16_t port);
bool Matches(uint16_t port) const;
vector<ArtsPortChoice> & PortChoices() const ;
uint32_t Length(uint8_t version ) const;
istream & read(istream & is);
int read(int fd);
ostream & write(ostream & os) const;
int write(int fd) const;
bool operator == (const ArtsPortChooser & portChooser) const;
friend ostream & operator << (ostream& os, const ArtsPortChooser & portChooser);
protected:

Back to the top of ArtsPortChooser


Ancestors

Class does not inherit from any other class.

Back to the top of ArtsPortChooser


Descendants

Class is not inherited by any others.

Back to the top of ArtsPortChooser


Generated from source by the Cocoon utilities on Sat Oct 17 14:40:00 1998 .

Report problems to jkotula@unimax.com