\section{TObject Class Reference}
\label{class_t_object}\index{TObject@{TObject}}
Base class for all project classes.  


{\tt \#include $<$tobject.h$>$}

Inheritance diagram for TObject::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=12cm]{class_t_object}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual const char $\ast$ {\bf get\-Type} () const 
\begin{CompactList}\small\item\em Return type of class. \item\end{CompactList}\item 
virtual bool {\bf has\-Parent} (const char $\ast$class\-Name) const 
\begin{CompactList}\small\item\em Check if class is inherited from class named class\-Name. \item\end{CompactList}\item 
virtual bool {\bf compare\-To} ({\bf TObject} $\ast$object) const 
\begin{CompactList}\small\item\em Compare two objects. \item\end{CompactList}\item 
virtual const string \& {\bf to\-String} () const 
\begin{CompactList}\small\item\em Simple text dump. \item\end{CompactList}\item 
virtual {\bf TObject} $\ast$ {\bf clone} ()
\begin{CompactList}\small\item\em Create deep-clone of object. \item\end{CompactList}\item 
bool {\bf type\-Of} (const char $\ast$type) const 
\begin{CompactList}\small\item\em Check if this instance is of type \char`\"{}type\char`\"{}. \item\end{CompactList}\item 
void {\bf upcount} () const 
\begin{CompactList}\small\item\em Increase number of refences count. Do not call directly, use {\bf Ptr}{\rm (p.\,\pageref{class_ptr})} class instead. \item\end{CompactList}\item 
void {\bf downcount} () const 
\begin{CompactList}\small\item\em Decrease number of refences count. Do not call directly, use {\bf Ptr}{\rm (p.\,\pageref{class_ptr})} class instead. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Base class for all project classes. 

Handles reference counting, type checking, provides virtual methods for cloning, comparing and text dump.

For valid type-checking should all subclasses declare static member type and override get\-Type method like this : 

\footnotesize\begin{verbatim} class MyClass:public TObject {
 public:
    static const char* type;
    const char* getType() const {
       return type;
    }
 };

 const char* MyClass::type="MyClass";
\end{verbatim}
\normalsize


\begin{Desc}
\item[Date:]01-13-2006\end{Desc}
\begin{Desc}
\item[Author:]Ondrej Svejdar\end{Desc}
\begin{Desc}
\item[{\bf Todo}]\end{Desc}
\begin{Desc}
\item[{\bf Bug}]\end{Desc}




\subsection{Member Function Documentation}
\index{TObject@{TObject}!clone@{clone}}
\index{clone@{clone}!TObject@{TObject}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf TObject} $\ast$ TObject::clone ()\hspace{0.3cm}{\tt  [virtual]}}\label{class_t_object_a57a4061e6b07e21891be7a967c53f91}


Create deep-clone of object. 

\begin{Desc}
\item[Returns:]deep-clone of object \end{Desc}


Reimplemented in {\bf Tk\-Base} {\rm (p.\,\pageref{class_tk_base_eeacc64c3f35a0f65819595fa0f5e3c6})}, {\bf Tk\-Button} {\rm (p.\,\pageref{class_tk_button_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Check\-Button} {\rm (p.\,\pageref{class_tk_check_button_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Entry} {\rm (p.\,\pageref{class_tk_entry_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Frame} {\rm (p.\,\pageref{class_tk_frame_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Grid\-Constraints} {\rm (p.\,\pageref{class_tk_grid_constraints_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Label} {\rm (p.\,\pageref{class_tk_label_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Listbox} {\rm (p.\,\pageref{class_tk_listbox_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Menu} {\rm (p.\,\pageref{class_tk_menu_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Place\-Constraints} {\rm (p.\,\pageref{class_tk_place_constraints_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Radio\-Button} {\rm (p.\,\pageref{class_tk_radio_button_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Scroll\-Bar} {\rm (p.\,\pageref{class_tk_scroll_bar_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Spin\-Box} {\rm (p.\,\pageref{class_tk_spin_box_a57a4061e6b07e21891be7a967c53f91})}, {\bf Tk\-Text} {\rm (p.\,\pageref{class_tk_text_a57a4061e6b07e21891be7a967c53f91})}, and {\bf Tk\-Top\-Level} {\rm (p.\,\pageref{class_tk_top_level_a57a4061e6b07e21891be7a967c53f91})}.\index{TObject@{TObject}!compareTo@{compareTo}}
\index{compareTo@{compareTo}!TObject@{TObject}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TObject::compare\-To ({\bf TObject} $\ast$ {\em object}) const\hspace{0.3cm}{\tt  [virtual]}}\label{class_t_object_982458dfa9736a7c6ca22b3b6b8e9a1d}


Compare two objects. 

\begin{Desc}
\item[Note:]If method is not overriden it throws {\bf Exception\-No\-Implementation}{\rm (p.\,\pageref{class_exception_no_implementation})} when called. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em object}]pointer to another object \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if object are equal \end{Desc}


Reimplemented in {\bf Tk\-Base} {\rm (p.\,\pageref{class_tk_base_982458dfa9736a7c6ca22b3b6b8e9a1d})}.\index{TObject@{TObject}!downcount@{downcount}}
\index{downcount@{downcount}!TObject@{TObject}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TObject::downcount () const\hspace{0.3cm}{\tt  [inline]}}\label{class_t_object_6ab4294b077e9f09e50e901e20b1a7cc}


Decrease number of refences count. Do not call directly, use {\bf Ptr}{\rm (p.\,\pageref{class_ptr})} class instead. 

\begin{Desc}
\item[See also:]{\bf Ptr}{\rm (p.\,\pageref{class_ptr})} \end{Desc}
\index{TObject@{TObject}!getType@{getType}}
\index{getType@{getType}!TObject@{TObject}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char $\ast$ TObject::get\-Type () const\hspace{0.3cm}{\tt  [virtual]}}\label{class_t_object_1413702cbda682553d02b08afccebfc3}


Return type of class. 

\begin{Desc}
\item[Returns:]type of class \end{Desc}


Reimplemented in {\bf App\-Window} {\rm (p.\,\pageref{class_app_window_1413702cbda682553d02b08afccebfc3})}, {\bf Designer} {\rm (p.\,\pageref{class_designer_1413702cbda682553d02b08afccebfc3})}, {\bf Frm\-List} {\rm (p.\,\pageref{class_frm_list_1413702cbda682553d02b08afccebfc3})}, {\bf Exception} {\rm (p.\,\pageref{class_exception_1413702cbda682553d02b08afccebfc3})}, {\bf Exception\-Base} {\rm (p.\,\pageref{class_exception_base_1413702cbda682553d02b08afccebfc3})}, {\bf Exception\-Eval} {\rm (p.\,\pageref{class_exception_eval_1413702cbda682553d02b08afccebfc3})}, {\bf Exception\-IO} {\rm (p.\,\pageref{class_exception_i_o_1413702cbda682553d02b08afccebfc3})}, {\bf Exception\-No\-Implementation} {\rm (p.\,\pageref{class_exception_no_implementation_1413702cbda682553d02b08afccebfc3})}, {\bf Exception\-Null\-Ptr} {\rm (p.\,\pageref{class_exception_null_ptr_1413702cbda682553d02b08afccebfc3})}, {\bf Exception\-Type} {\rm (p.\,\pageref{class_exception_type_1413702cbda682553d02b08afccebfc3})}, {\bf Command} {\rm (p.\,\pageref{class_command_1413702cbda682553d02b08afccebfc3})}, {\bf IModule} {\rm (p.\,\pageref{class_i_module_1413702cbda682553d02b08afccebfc3})}, {\bf Mesg\-Var\-Change} {\rm (p.\,\pageref{class_mesg_var_change_1413702cbda682553d02b08afccebfc3})}, {\bf Mesg\-Command} {\rm (p.\,\pageref{class_mesg_command_1413702cbda682553d02b08afccebfc3})}, {\bf Mesg\-Application\-Exit} {\rm (p.\,\pageref{class_mesg_application_exit_1413702cbda682553d02b08afccebfc3})}, {\bf Module\-Manager} {\rm (p.\,\pageref{class_module_manager_1413702cbda682553d02b08afccebfc3})}, {\bf Module\-Type} {\rm (p.\,\pageref{class_module_type_1413702cbda682553d02b08afccebfc3})}, {\bf Var\-Def} {\rm (p.\,\pageref{class_var_def_1413702cbda682553d02b08afccebfc3})}, {\bf Var\-Bool} {\rm (p.\,\pageref{class_var_bool_1413702cbda682553d02b08afccebfc3})}, {\bf Var\-Char} {\rm (p.\,\pageref{class_var_char_1413702cbda682553d02b08afccebfc3})}, {\bf Var\-Integer} {\rm (p.\,\pageref{class_var_integer_1413702cbda682553d02b08afccebfc3})}, {\bf Var\-Double} {\rm (p.\,\pageref{class_var_double_1413702cbda682553d02b08afccebfc3})}, {\bf Var\-String} {\rm (p.\,\pageref{class_var_string_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Photo} {\rm (p.\,\pageref{class_tk_photo_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Button} {\rm (p.\,\pageref{class_tk_button_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Check\-Button} {\rm (p.\,\pageref{class_tk_check_button_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Entry} {\rm (p.\,\pageref{class_tk_entry_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Frame} {\rm (p.\,\pageref{class_tk_frame_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Grid\-Constraints} {\rm (p.\,\pageref{class_tk_grid_constraints_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Grid\-Layout} {\rm (p.\,\pageref{class_tk_grid_layout_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Label} {\rm (p.\,\pageref{class_tk_label_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Layout} {\rm (p.\,\pageref{class_tk_layout_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Listbox} {\rm (p.\,\pageref{class_tk_listbox_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Menu\-Separator} {\rm (p.\,\pageref{class_tk_menu_separator_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Menu\-Command} {\rm (p.\,\pageref{class_tk_menu_command_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Menu} {\rm (p.\,\pageref{class_tk_menu_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Place\-Constraints} {\rm (p.\,\pageref{class_tk_place_constraints_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Place\-Layout} {\rm (p.\,\pageref{class_tk_place_layout_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Radio\-Button} {\rm (p.\,\pageref{class_tk_radio_button_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Scroll\-Bar} {\rm (p.\,\pageref{class_tk_scroll_bar_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Spin\-Box} {\rm (p.\,\pageref{class_tk_spin_box_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Text} {\rm (p.\,\pageref{class_tk_text_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Top\-Level\-Listener} {\rm (p.\,\pageref{class_tk_top_level_listener_1413702cbda682553d02b08afccebfc3})}, {\bf Tk\-Top\-Level} {\rm (p.\,\pageref{class_tk_top_level_1413702cbda682553d02b08afccebfc3})}, {\bf Tcl\-Interp} {\rm (p.\,\pageref{class_tcl_interp_1413702cbda682553d02b08afccebfc3})}, {\bf Tcl\-Bool\-Var} {\rm (p.\,\pageref{class_tcl_bool_var_1413702cbda682553d02b08afccebfc3})}, {\bf Tcl\-Double\-Var} {\rm (p.\,\pageref{class_tcl_double_var_1413702cbda682553d02b08afccebfc3})}, {\bf Tcl\-Int\-Var} {\rm (p.\,\pageref{class_tcl_int_var_1413702cbda682553d02b08afccebfc3})}, {\bf Tcl\-List\-Var} {\rm (p.\,\pageref{class_tcl_list_var_1413702cbda682553d02b08afccebfc3})}, {\bf Tcl\-String\-Var} {\rm (p.\,\pageref{class_tcl_string_var_1413702cbda682553d02b08afccebfc3})}, {\bf Tcl\-Var} {\rm (p.\,\pageref{class_tcl_var_1413702cbda682553d02b08afccebfc3})}, and {\bf TXml\-Object} {\rm (p.\,\pageref{class_t_xml_object_1413702cbda682553d02b08afccebfc3})}.\index{TObject@{TObject}!hasParent@{hasParent}}
\index{hasParent@{hasParent}!TObject@{TObject}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TObject::has\-Parent (const char $\ast$ {\em class\-Name}) const\hspace{0.3cm}{\tt  [virtual]}}\label{class_t_object_7fbb45a4d4ba4b5c543927cbf45de180}


Check if class is inherited from class named class\-Name. 

We're using pointer comparation, so typicall usage should be like this : 

\footnotesize\begin{verbatim} bool isInheritedFromMyClass=hasParent(MyClass::type)
\end{verbatim}
\normalsize
 \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em class\-Name}]pointer to type of class \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true, if this instance is inherited from class named class\-Name \end{Desc}


Reimplemented in {\bf TXml\-Object} {\rm (p.\,\pageref{class_t_xml_object_7fbb45a4d4ba4b5c543927cbf45de180})}.\index{TObject@{TObject}!toString@{toString}}
\index{toString@{toString}!TObject@{TObject}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const string \& TObject::to\-String () const\hspace{0.3cm}{\tt  [virtual]}}\label{class_t_object_ca11bae3941982bbc2db10b06d450336}


Simple text dump. 

\begin{Desc}
\item[Returns:]if not overriden, it returns type of class \end{Desc}


Reimplemented in {\bf Var\-Inst} {\rm (p.\,\pageref{class_var_inst_2016e7fc7fb9a0dfca0533ad256e87dd})}, {\bf Var\-Bool} {\rm (p.\,\pageref{class_var_bool_ca11bae3941982bbc2db10b06d450336})}, {\bf Var\-Char} {\rm (p.\,\pageref{class_var_char_ca11bae3941982bbc2db10b06d450336})}, {\bf Var\-Integer} {\rm (p.\,\pageref{class_var_integer_ca11bae3941982bbc2db10b06d450336})}, {\bf Var\-Double} {\rm (p.\,\pageref{class_var_double_ca11bae3941982bbc2db10b06d450336})}, {\bf Var\-String} {\rm (p.\,\pageref{class_var_string_ca11bae3941982bbc2db10b06d450336})}, {\bf Tk\-Photo} {\rm (p.\,\pageref{class_tk_photo_ca11bae3941982bbc2db10b06d450336})}, {\bf Tk\-Base} {\rm (p.\,\pageref{class_tk_base_ca11bae3941982bbc2db10b06d450336})}, {\bf Tk\-Grid\-Constraints} {\rm (p.\,\pageref{class_tk_grid_constraints_ca11bae3941982bbc2db10b06d450336})}, {\bf Tk\-Place\-Constraints} {\rm (p.\,\pageref{class_tk_place_constraints_ca11bae3941982bbc2db10b06d450336})}, and {\bf Tcl\-Var} {\rm (p.\,\pageref{class_tcl_var_ca11bae3941982bbc2db10b06d450336})}.\index{TObject@{TObject}!typeOf@{typeOf}}
\index{typeOf@{typeOf}!TObject@{TObject}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TObject::type\-Of (const char $\ast$ {\em type}) const\hspace{0.3cm}{\tt  [inline]}}\label{class_t_object_85cc720187b99a3e617e7d60a641ed68}


Check if this instance is of type \char`\"{}type\char`\"{}. 

\begin{Desc}
\item[Note:]we're using pointer comparation \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]pointer to type of class \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true, if this instance is instance of class named type \end{Desc}
\index{TObject@{TObject}!upcount@{upcount}}
\index{upcount@{upcount}!TObject@{TObject}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TObject::upcount () const\hspace{0.3cm}{\tt  [inline]}}\label{class_t_object_c1836a746ee08ef51fb4b711bd8b479b}


Increase number of refences count. Do not call directly, use {\bf Ptr}{\rm (p.\,\pageref{class_ptr})} class instead. 

\begin{Desc}
\item[See also:]{\bf Ptr}{\rm (p.\,\pageref{class_ptr})} \end{Desc}


The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
H:/projs/dot\-NET/eda/src/tobject.h\item 
H:/projs/dot\-NET/eda/src/tobject.cpp\end{CompactItemize}
