Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages | Search for

# eoAged< Object > Class Template Reference

eoAge is a template class that adds an age to an object.\ Requisites for template instantiation are that the object must admit a default ctor and a copy ctor. More...

`#include <eoAged.h>`

List of all members.

## Public Member Functions
| eoAged (const Object &_o)
| Main ctor from an already built Object.
| eoAged (const eoAged &_a)
| Copy constructor.
virtual | ~eoAged ()
| Virtual dtor. They are needed in virtual class hierarchies.
unsigned long | Age () const
| returns the age of the object
const eoAged & | operator++ ()
| Increments age.
Methods from eoObject
readFrom and printOn are directly inherited from eo1d
virtual std::string | className () const
| Return the class id.
virtual void | readFrom (istream &_is)
| Read object.
virtual void | printOn (ostream &_os) const
| Write object.
## Private Member Functions
| eoAged ()
| Default Constructor.
## Private Attributes
unsigned long | age

## Detailed Description

### template<class Object>
class eoAged< Object >

eoAge is a template class that adds an age to an object.\ Requisites for template instantiation are that the object must admit a default ctor and a copy ctor.

The Object must be an eoObject, thus, it must have its methods: className, printOn, readFrom.

See also:
  eoObject

Definition at line 47 of file eoAged.h.

## Constructor & Destructor Documentation

template<class Object>
eoAged< Object >::eoAged | ( |  | ) | `[inline, private]`

| Default Constructor. \ Itīs private so that it is not used anywhere; the right way of using this object is to create an Object and passing it to an aged by means of the copy ctor; that way itīs turned into an Aged object Definition at line 103 of file eoAged.h.

## Member Function Documentation

template<class Object>
virtual std::string eoAged< Object >::className | ( |  | ) | const`[inline, virtual]`

| Return the class id. This should be redefined in each class; but it's got code as an example of implementation. Only "leaf" classes can be non-virtual. Definition at line 74 of file eoAged.h.

template<class Object>
virtual void eoAged< Object >::readFrom | ( | istream & | _is | ) | `[inline, virtual]`

  | Read object. Parameters:
  | _is | A istream.
  Exceptions:
  | runtime_exception | If a valid object can't be read.
Definition at line 81 of file eoAged.h.

template<class Object>
virtual void eoAged< Object >::printOn | ( | ostream & | _os | ) | const`[inline, virtual]`

  | Write object. It's called printOn since it prints the object _on_ a stream. Parameters:
  | _os | A ostream.
Definition at line 91 of file eoAged.h.

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

- eoAged.h