input Class Reference

#include <input.h>


Public Member Functions

 ~input ()
 input ()
 input (input_ty *arg)
 input (const input &arg)
inputoperator= (const input &arg)
input_tyoperator-> ()
const input_tyoperator-> () const
void close ()
bool is_open () const
bool valid () const

Private Attributes

input_tyref

Friends

class input_ty


Detailed Description

The input class is a so-called smart pointer, which automatically keeps track of input usage, and deletes the instance once the last consumer has let it go.

Definition at line 358 of file input.h.


Constructor & Destructor Documentation

input::~input (  ) 

The destructor.

Note:
This destructor is not virtual. DO NOT derive from this class.

input::input (  ) 

The default constructor.

This is dangerous. The reference will be NULL, so if you try to dereference it the code will segfault.

input::input ( input_ty arg  ) 

The constructor.

Parameters:
arg The input stream to be managed. Its reference count will NOT be incrimented, it is assumed you are giving the "dumb" pointer to this "smart pointer" to manage.

input::input ( const input arg  ) 

The copy constructor.


Member Function Documentation

input& input::operator= ( const input arg  ) 

The assignment operator.

input_ty* input::operator-> (  )  [inline]

The member operator.

This is why it's called a "smart pointer" when it is actually neither. Because we return a pointer to the referenced input_ty object, this class presents what appears to be the same interface as input_ty to the interface user.

Definition at line 421 of file input.h.

const input_ty* input::operator-> (  )  const [inline]

The member operator.

This is why it's called a "smart pointer" when it is actually neither. Because we return a pointer to the referenced input_ty object, this class presents what appears to be the same interface as input_ty to the interface user.

Definition at line 431 of file input.h.

void input::close (  ) 

The close method may be used to delete (actually, decriment the reference count and conditionally delete) the managed input_ty object. Acess to this smart pointer will hereafter get segfaults until another input is assigned to it.

bool input::is_open (  )  const [inline]

The is_open method may be used to determine if this "smart pointer" is actuallyt pointing at something. This is an input source so the open/closed metaphore works for us.

Definition at line 446 of file input.h.

bool input::valid (  )  const

The valid method is used (when debugging) to determine if this object is in a valid state.


Friends And Related Function Documentation

friend class input_ty [friend]

Definition at line 360 of file input.h.


Field Documentation

input_ty* input::ref [private]

The ref instance variable is used to remember the location of the dynamically allocated input object.

Definition at line 459 of file input.h.


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

Generated on Wed Mar 12 23:37:39 2008 for Aegis by  doxygen 1.5.5