Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Attribute Class Reference

#include <attribute.h>

Inheritance diagram for Attribute:
NominalAttribute NumericAttribute

Public Member Functions

 Attribute ()
 
 Attribute (string name)
 
string getName () const
 
virtual int getSize () const
 
void setName (string name)
 

Protected Member Functions

virtual void print (ostream &out=cout) const
 

Protected Attributes

string name
 

Friends

ostream & operator<< (ostream &out, const Attribute &a)
 

Constructor & Destructor Documentation

Attribute::Attribute ( )

Default constructor.

Attribute::Attribute ( string  name)

Explicit constructor. name.

Parameters
namethe name of this attribute

Member Function Documentation

string Attribute::getName ( ) const

Gets the name of this attribute.

Returns
a string storing the name
int Attribute::getSize ( ) const
virtual

Gets the size of this attribute's domain.

Returns
an int storing the size of the domain

Reimplemented in NominalAttribute, and NumericAttribute.

void Attribute::print ( ostream &  out = cout) const
protectedvirtual

Prints this attribute to the specified output stream.

Parameters
outthe output stream for printing

Reimplemented in NominalAttribute, and NumericAttribute.

void Attribute::setName ( string  name)

Sets the name of this attribute to the specified name.

Parameters
namethe name of this attribute

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const Attribute a 
)
friend

Writes the specified attribute to the output stream and returns it.

Parameters
outthe output stream for writing
athe specified attribute for writing
Returns
the modified output stream

Member Data Documentation

string Attribute::name
protected

this attribute's name


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