% File: ~/domain/component/DomainComponent.tex 
% What: "@(#) DomainComponent.tex, revA"

\noindent {\bf Files}   \\
\indent \#include $<\tilde{ }$/domain/component/DomainComponent.h$>$  \\

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

\noindent {\bf Class Hierarchy} \\
\indent  TaggedObject \\
\indent  MovableObject \\
\indent\indent  {\bf DomainComponent} \\
\indent\indent\indent  Element \\
\indent\indent\indent  Node \\
\indent\indent\indent  NodalLoad \\
\indent\indent\indent  ElementalLoad \\
\indent\indent\indent  SP\_Constraint \\
\indent\indent\indent  MP\_Constraint \\

\noindent {\bf Description}  \\
\indent The DomainComponent class is an abstract class, example
subclasses include Element, Node, SP\_Constraint, MP\_Constraint,
NodalLoad, ElementalLoad. Each object of these types is a component of
an enclosing Domain object. The DomainComponent class provides methods
to set and retrieve a pointer to the enclosing Domain object. \\

\noindent {\bf Class Interface}  \\
\indent\indent // Constructor  \\
\indent\indent {\em DomainComponent(int tag, int classTag);}  \\ \\
\indent\indent // Destructor  \\
\indent\indent {\em virtual~ $\tilde{}$DomainComponent();}  \\ \\
\indent\indent // Public Methods  \\
\indent\indent {\em virtual void setDomain(Domain *theDomain);} \\
\indent\indent {\em virtual Domain *getDomain(void) const;}\\
\indent\indent {\em virtual int displaySelf(Renderer \&theRenderer, int
displayMode, float fact); } \\

\noindent {\bf Constructor}  \\
\indent {\em DomainComponent(int tag, int classTag);}  \\
Constructs a DomainComponent with a tag given by {\em tag}, whose
class tag is given by {\em classTag}. 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. The {\em classTag} is a means of identifying the class of the object.
No domain is associated with the object. The integer {\em tag} is
passed to the TaggedObject constructor and the integer {\em classTag}
is passed to the MovableObject constructor. \\

\noindent {\bf Destructor}  \\
\indent {\em virtual~ $\tilde{}$DomainComponent();}  \\
Does nothing. Provided so subclasses destructor's will always be
called. \\

\noindent {\bf Public Methods}  \\
\indent {\em virtual void setDomain(Domain *theDomain);} \\
Sets the encompassing domain of the component to that given by {\em
theDomain}. This method is invoked by {\em theDomain} when the component is
being added to the domain, in an {\em addDomain..} invocation (see
interface for Domain). \\

\indent {\em virtual Domain *getDomain(void) const;}\\
Returns a pointer to the Domain to which the component was added,
or $0$ if the {\em setDomain()} command was never called on the
object. \\

\indent {\em virtual int displaySelf(Renderer \&theRenderer, int
displayMode, float fact); } \\ 
To cause the object to display itself using {\em theRenderer}. The
integer {\em displayMode} is used to indicate what is to be displayed
and the float {\em fact} is used to factor the nodal displacements. 
To return $0$ if successful, a negative number if not. This base
class simply returns $0$. Its up to the subclasses to override this
method if the objects are to be rendered.

