% File: ~/tagged/TaggedObject.tex 
% What: "@(#) TaggedObject.tex, revA"

\noindent {\bf Files}   \\
\indent \#include $<\tilde{ }$/tagged/TaggedObject.h$>$ \\

\noindent {\bf Class Declaration}  \\
\indent class TaggedObject  \\

\noindent {\bf Class Hierarchy} \\
\indent  {\bf TaggedObject} \\
\indent\indent  {DomainComponent} \\
\indent\indent  {Vertex} \\

\noindent {\bf Description}  \\
\indent TaggedObject is used as a base class to represent all classes
that may have a integer identifier, a tag, to identify the object. It
is used in the framework as a base class for many classes, for example
DomainComponent and Vertex. The class is provided so that container
classes can be written to store objects and provide access to
them. This saves us rewriting container classes for each type of 
object. (templates will be able to provide this functionality when
they are provided with all compilers). \\ 

\noindent {\bf Class Interface}  \\
\indent // Constructor  \\
\indent {\em TaggedObject(int tag);}  \\ \\
\indent // Destructor  \\
\indent {\em virtual~ $\tilde{}$TaggedObject();}  \\ \\
\indent // Public Methods  \\
\indent {\em int getTag(void) const;} \\ 
\indent {\em virtual void Print(OPS_Stream \&s) =0;} \\
\indent {\em friend OPS_Stream \&operator$<<$(OPS_Stream \&s,
TaggedObject \&m);} \\  \\ 
\indent // Protected Methods  \\
\indent {\em virtual void setTag(int newTag);} \\

\noindent {\bf Constructors}  \\
\indent {\em TaggedObject(int tag);}  \\
Constructs a TaggedObject with a tag given by {\em tag}. The tag of
a component is some unique means of identifying the component among
like components, i.e. the tag of a node would be its unique node number. \\

\noindent {\bf Destructor}  \\
\indent {\em virtual~ $\tilde{}$TaggedObject();}\\
Does nothing. Provided so the concrete subclasses destructors will be
called. \\

\noindent {\bf Public Member Functions}  \\
\indent {\em int getTag(void) const;} \\
Returns the tag associated with the object. This function is inlined
for performance.\\

\indent {\em virtual void Print(OPS_Stream \&s, int flag =0) =0;} \\
A pure virtual function. The component is to output itself to the output
stream {\em s}. The integer {\em flag} can be used to select just what
should be output, by default $0$ is passed. \\

\indent {\em friend OPS_Stream \&operator$<<$(OPS_Stream \&s, TaggedObject \&m);} \\  
Invokes {\em Print(s)} on the TaggedObject {\em m}. \\

\noindent {\bf Protected Member Functions}  \\
\indent {\em virtual void setTag(int newTag);} \\
Sets the tag of the object to be {\em newTag}. It is provided so that
MovableObjects can set their tag in {\em recvSelf()}.







