Aegis  4.25.D505
Public Member Functions | Private Attributes | Friends
input Class Reference

#include <input.h>

Public Member Functions

 ~input ()
 input ()
 input (input_ty::pointer arg)
 input (const input &arg)
inputoperator= (const input &arg)
input_ty::pointer operator-> ()
input_ty::pointer operator-> () const
void close ()
bool is_open () const
bool valid () const

Private Attributes

input_ty::pointer ref

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 324 of file input.h.


Constructor & Destructor Documentation

The destructor.

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

The default constructor.

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

The constructor.

Parameters:
argThe 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

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 412 of file input.h.

input_ty::pointer 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 387 of file input.h.

input_ty::pointer 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 397 of file input.h.

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

The assignment operator.

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 326 of file input.h.


Field Documentation

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

Definition at line 425 of file input.h.


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