ArtsAttribute


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

Quick Index

DESCRIPTION

Class Summary

class ArtsAttribute

{

public:
ArtsAttribute();
~ArtsAttribute();
ArtsAttribute & operator = (const ArtsAttribute artsAttribute);
uint32_t Identifier() const ;
uint32_t Identifier(uint32_t identifier) ;
uint8_t Format() const ;
uint8_t Format(uint8_t format) ;
uint32_t Length() const ;
uint32_t Length(uint32_t length) ;
const string Comment() const ;
uint32_t Creation() const ;
uint32_t Creation(uint32_t creation) ;
const uint32_t *Period() const ;
uint32_t *Period(uint32_t startTime, uint32_t endTime) ;
ipv4addr_t Host() const ;
ipv4addr_t Host(ipv4addr_t host) ;
const string Interface() const ;
string Interface(const string & interface) ;
uint16_t IfIndex() const ;
uint16_t IfIndex(uint16_t ifIndex) ;
void *Arbitrary() const ;
void *Arbitrary(void *arbitrary) ;
ostream& write(ostream& os) const;
int write(int fd) const;
istream& read(istream& is);
int read(int fd);
uint32_t Bytes() const ;
friend ostream & operator << (ostream &os, ArtsAttribute & artsAttribute);
protected:
}; // ArtsAttribute

Back to the top of ArtsAttribute


DESCRIPTION


---------------------------------------------------------------------------
class ArtsAttribute
---------------------------------------------------------------------------
Class to encapsulate an ARTS attribute.
---------------------------------------------------------------------------

Back to the top of ArtsAttribute


ArtsAttribute();


-------------------------------------------------------------------------
ArtsAttribute()
.........................................................................
constructor
-------------------------------------------------------------------------

  ArtsAttribute();

Back to the top of ArtsAttribute


~ArtsAttribute();


-------------------------------------------------------------------------
~ArtsAttribute()
.........................................................................
destructor
-------------------------------------------------------------------------

  ~ArtsAttribute();

Back to the top of ArtsAttribute


ArtsAttribute & operator = (const ArtsAttribute artsAttribute);


-------------------------------------------------------------------------
ArtsAttribute & operator = (const ArtsAttribute artsAttribute)
.........................................................................
Overloaded '=' operator for deep-copying an ArtsAttribute.
-------------------------------------------------------------------------

  ArtsAttribute & operator = (const ArtsAttribute artsAttribute);

Back to the top of ArtsAttribute


uint32_t Identifier() const ;


-------------------------------------------------------------------------
inline uint32_t Identifier() const
.........................................................................
Returns the attribute identifier.
-------------------------------------------------------------------------

  inline uint32_t Identifier() const
                                      
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint32_t Identifier(uint32_t identifier) ;


-------------------------------------------------------------------------
inline uint32_t Identifier(uint32_t identifier)
.........................................................................
Sets and returns the attribute identifier.
-------------------------------------------------------------------------

  inline uint32_t Identifier(uint32_t identifier)
                                                                          
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint8_t Format() const ;


-------------------------------------------------------------------------
inline uint8_t Format() const
.........................................................................
Returns the attribute format.
-------------------------------------------------------------------------

  inline uint8_t Format() const
                                  
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint8_t Format(uint8_t format) ;


-------------------------------------------------------------------------
inline uint8_t Format(uint8_t format)
.........................................................................
Sets and returns the attribute format.
-------------------------------------------------------------------------

  inline uint8_t Format(uint8_t format)
                                                              
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint32_t Length() const ;


-------------------------------------------------------------------------
inline uint32_t Length() const
.........................................................................
Returns the attribute length.
-------------------------------------------------------------------------

  inline uint32_t Length() const
                                  
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint32_t Length(uint32_t length) ;


-------------------------------------------------------------------------
inline uint32_t Length(uint32_t length)
.........................................................................
Sets and returns the attribute length.
-------------------------------------------------------------------------

  inline uint32_t Length(uint32_t length)
                                                              
;

Function is currently defined inline.


Back to the top of ArtsAttribute


const string Comment() const ;


-------------------------------------------------------------------------
inline const string Comment() const
.........................................................................
Returns the attribute comment if the attribute really is a comment attribute, otherwise asserts.
-------------------------------------------------------------------------

  inline const string Comment() const
                                                                                                  
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint32_t Creation() const ;


-------------------------------------------------------------------------
inline uint32_t Creation() const
.........................................................................
Returns the attribute creation timestamp if the attribute identifier is artsC_ATTR_CREATION (i.e. the attirbute really is a creation attribute), else asserts.
-------------------------------------------------------------------------

  inline uint32_t Creation() const
                                                                                                 
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint32_t Creation(uint32_t creation) ;


-------------------------------------------------------------------------
inline uint32_t Creation(uint32_t creation)
.........................................................................
Sets and returns the attribute creation timestamp if the attribute identifier is artsC_ATTR_CREATION (i.e. the attirbute really is a creation attribute), else asserts.
-------------------------------------------------------------------------

  inline uint32_t Creation(uint32_t creation)
                                                                                                                                       
;

Function is currently defined inline.


Back to the top of ArtsAttribute


const uint32_t *Period() const ;


-------------------------------------------------------------------------
inline const uint32_t *Period() const
.........................................................................
Returns the attribute period if the attribute is really a period attribute, else asserts.
-------------------------------------------------------------------------

  inline const uint32_t *Period() const
                                                                                             
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint32_t *Period(uint32_t startTime, uint32_t endTime) ;


-------------------------------------------------------------------------
inline uint32_t *Period(uint32_t startTime, uint32_t endTime)
.........................................................................
Sets and returns the attribute period if the attribute is really a period attribute, else asserts.
-------------------------------------------------------------------------

  inline uint32_t *Period(uint32_t startTime, uint32_t endTime)
                                                                                                                                                                           
;

Function is currently defined inline.


Back to the top of ArtsAttribute


ipv4addr_t Host() const ;


-------------------------------------------------------------------------
inline ipv4addr_t Host() const
.........................................................................
Returns the attribute IP address if the attribute is really a host attribute, else asserts.
-------------------------------------------------------------------------

  inline ipv4addr_t Host() const
                                                                                         
;

Function is currently defined inline.


Back to the top of ArtsAttribute


ipv4addr_t Host(ipv4addr_t host) ;


-------------------------------------------------------------------------
inline ipv4addr_t Host(ipv4addr_t host)
.........................................................................
Sets and returns the attribute IP address if the attribute is really a host attribute, else asserts.
-------------------------------------------------------------------------

  inline ipv4addr_t Host(ipv4addr_t host)
                                                                                                                       
;

Function is currently defined inline.


Back to the top of ArtsAttribute


const string Interface() const ;


-------------------------------------------------------------------------
inline const string Interface() const
.........................................................................
Returns the attribute interface name if the attribute is really an interface attribute, else asserts.
-------------------------------------------------------------------------

  inline const string Interface() const
                                                                                                      
;

Function is currently defined inline.


Back to the top of ArtsAttribute


string Interface(const string & interface) ;


-------------------------------------------------------------------------
inline string Interface(const string & interface)
.........................................................................
Sets and returns the attribute interface name if the attribute is really an interface attribute, else asserts.
-------------------------------------------------------------------------

  inline string Interface(const string & interface)
                                                                                                                                                                                                                                     
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint16_t IfIndex() const ;


-------------------------------------------------------------------------
inline uint16_t IfIndex() const
.........................................................................
Returns the interface index if the attribute is really an interface index attribute, else asserts.
-------------------------------------------------------------------------

  inline uint16_t IfIndex() const
                                                                                               
;

Function is currently defined inline.


Back to the top of ArtsAttribute


uint16_t IfIndex(uint16_t ifIndex) ;


-------------------------------------------------------------------------
inline uint16_t IfIndex(uint16_t ifIndex)
.........................................................................
Sets and returns the ifIndex if the attribute is really an interface index attribute, else asserts.
-------------------------------------------------------------------------

  inline uint16_t IfIndex(uint16_t ifIndex)
                                                                                                                                   
;

Function is currently defined inline.


Back to the top of ArtsAttribute


void *Arbitrary() const ;


-------------------------------------------------------------------------
inline void *Arbitrary() const
.........................................................................
Returns the value of an arbitrary-format ARTS attribute. Arbitrary attributes can be used when a pre-defined attribute type does not exist for the type of data stored in the attribute. For example, an application-specific attribute. The pointer returned here is just a pointer to a block of memory of length ArtsAttribute::Length(). It is the responsibility of the caller to convert to an approriate representation.
-------------------------------------------------------------------------

  inline void *Arbitrary() const
                                           
;

Function is currently defined inline.


Back to the top of ArtsAttribute


void *Arbitrary(void *arbitrary) ;


-------------------------------------------------------------------------
inline void *Arbitrary(void *arbitrary)
.........................................................................
Sets and returns the value of an arbitrary-format ARTS attribute. Note that the pointer passed in should be a pointer to a block of memory of length ArtsAttribute::Length(). Internally the ARTS library will treat the data as opaque.
-------------------------------------------------------------------------

  inline void *Arbitrary(void *arbitrary)
                                                                                   
;

Function is currently defined inline.


Back to the top of ArtsAttribute


ostream& write(ostream& os) const;


-------------------------------------------------------------------------
ostream& write(ostream& os) const
.........................................................................
Writes the attribute to an ostream and returns the ostream.
-------------------------------------------------------------------------

  ostream& write(ostream& os) const;

Back to the top of ArtsAttribute


int write(int fd) const;


-------------------------------------------------------------------------
int write(int fd) const
.........................................................................
Writes the attribute 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 ArtsAttribute


istream& read(istream& is);


-------------------------------------------------------------------------
istream& read(istream& is)
.........................................................................
Reads an attribute from an istream and returns the istream.
-------------------------------------------------------------------------

  istream& read(istream& is);

Back to the top of ArtsAttribute


int read(int fd);


-------------------------------------------------------------------------
int read(int fd)
.........................................................................
Reads an attribute from a file descriptor and returns the number of bytes read. UNTESTED
-------------------------------------------------------------------------

  int read(int fd);  // UNTESTED

Back to the top of ArtsAttribute


uint32_t Bytes() const ;


-------------------------------------------------------------------------
uint32_t Bytes() const
.........................................................................
Returns the number of bytes required to store the attribute on disk.
-------------------------------------------------------------------------

  uint32_t  Bytes() const
                                                                                      
;

Function is currently defined inline.


Back to the top of ArtsAttribute


friend ostream & operator << (ostream &os, ArtsAttribute & artsAttribute);


-------------------------------------------------------------------------
friend ostream & operator << (ostream &os, ArtsAttribute & artsAttribute)
.........................................................................
Overloaded '<<' operator to dump attribute to an ostream in a himan-readable form.
-------------------------------------------------------------------------

  friend ostream & operator << (ostream &os,
                                ArtsAttribute & artsAttribute);

Back to the top of ArtsAttribute


All Members

public:
ArtsAttribute & operator = (const ArtsAttribute artsAttribute);
uint32_t Identifier() const ;
uint32_t Identifier(uint32_t identifier) ;
uint8_t Format() const ;
uint8_t Format(uint8_t format) ;
uint32_t Length() const ;
uint32_t Length(uint32_t length) ;
const string Comment() const ;
uint32_t Creation() const ;
uint32_t Creation(uint32_t creation) ;
const uint32_t *Period() const ;
uint32_t *Period(uint32_t startTime, uint32_t endTime) ;
ipv4addr_t Host() const ;
ipv4addr_t Host(ipv4addr_t host) ;
const string Interface() const ;
string Interface(const string & interface) ;
uint16_t IfIndex() const ;
uint16_t IfIndex(uint16_t ifIndex) ;
void *Arbitrary() const ;
void *Arbitrary(void *arbitrary) ;
ostream& write(ostream& os) const;
int write(int fd) const;
istream& read(istream& is);
int read(int fd);
uint32_t Bytes() const ;
friend ostream & operator << (ostream &os, ArtsAttribute & artsAttribute);
protected:

Back to the top of ArtsAttribute


Ancestors

Class does not inherit from any other class.

Back to the top of ArtsAttribute


Descendants

Class is not inherited by any others.

Back to the top of ArtsAttribute


Generated from source by the Cocoon utilities on Sat Oct 17 14:39:52 1998 .

Report problems to jkotula@unimax.com