Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

VisObject.h

Go to the documentation of this file.
00001 #ifndef VisObjectH
00002 #define VisObjectH
00003 /*******************************************************************************
00004 Copyright 2000,2001,2002 Petr Kulhanek
00005 
00006     This file is part of Core plugin.
00007 
00008     Core plugin is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     Core plugin is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with Core plugin; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 *******************************************************************************/
00022 /*******************************************************************************
00023 ** COPYRIGHT (C):       1998,1999,2000 All Rights Reserved
00024 ** PROJEKT:             Projekt NEMESIS
00025 ** SOUBOR:              VisObject  (VisualObject)
00026 ** ÚČEL:                třída popisující základní vlastnosti VCL objektů
00027                                                 implementovaných jako objekty pluginů
00028 ** VERZE:               1.0
00029 ** JAZYK:               CBuilder C++
00030 ** CÍLOVÝ POČÍTAČ:      IBM PC
00031 ** PROGRAMÁTOR:         Petr Kulhánek
00032 ** HISTORIE ÚPRAV:
00033 VERZE   DATUM       POZNÁMKA
00034 1.0     2000-10-07  třída vznikla pro zvýšení modularizace celého kódu
00035                 2000-11-01      jako u CComObject zachována pouze nejnutnější část
00036 *******************************************************************************/
00037 
00041 /* HLAVIČKOVÉ SOUBORY *********************************************************/
00042 
00043 #include "CoreMainHeader.h"
00044 #include "Plugins.h"
00045 #include "ExtendedUUID.h"
00046 #include "SimpleList.h"
00047 
00048 #include <forms.hpp>
00049 
00050 /* KONEC HLAVIČKOVÝCH SOUBORů *************************************************/
00051 
00052 class CPluginObjectDescription;
00053 class CComObject;
00054 
00055 /* DEFINICE TŘÍD **************************************************************/
00056 
00058 
00061 class NEMESIS_CORE_PACKAGE CVisObject : public TForm{
00062     public:
00063   // konstrukce a destrukce objektu --------------------------------------------
00064 
00065   // metody - konstruktur a destruktor
00066             __fastcall CVisObject(TComponent* component,CComObject* owner,CPluginObjectInfo* objectinfo);
00067             __fastcall CVisObject(TComponent* component,CComObject* owner,CPluginObjectInfo* objectinfo,const CSmallString& name);
00068             __fastcall CVisObject(TComponent* component,CVisObject* owner,CPluginObjectInfo* objectinfo);
00069             __fastcall CVisObject(TComponent* component,CVisObject* owner,CPluginObjectInfo* objectinfo,const CSmallString& name);
00070 
00071     virtual __fastcall ~CVisObject(void);
00072 
00073   // popis a identifikace objektu ----------------------------------------------
00074   // metody - jméno a popis
00075 
00076         // událost ComObject_SetName
00077     inline void  __fastcall SetName(const CSmallString& name);
00078     inline const CSmallString&  __fastcall GetName(const CSmallString& name) const;
00079 
00080         // událost ComObject_SetDescription
00081     inline void  __fastcall SetDescription(const CSmallString& name);
00082     inline const CSmallString&  __fastcall GetDescription(const CSmallString& name) const;
00083 
00084   // metody - identifikace objektu
00085     inline const CExtUUID&              __fastcall GetType(void) const;           // typ prvku
00086     inline const CExtUUID&      __fastcall GetCategory(void) const;    // uuid kategorie do které patří
00087 
00088   // zjišťovací operace
00089     inline CComObject* __fastcall GetComOwner(void);
00090     void __fastcall SetOwner(CComObject* owner);
00091 
00092   // sekce soukromých dat ------------------------------------------------------
00093     private:
00094     virtual  void    __fastcall SetIndex(int index);
00095     virtual  int     __fastcall GetIndex(void);
00096 
00097     private:
00098         CPluginObjectInfo*                              ObjectInfo;                     // objekt pluginu
00099     int                             UIndex;             // jednoznačný indexový identifikátor
00100     CSmallString                    Name;               // jméno objektu
00101     CSmallString                    Description;        // popis objektu
00102 
00103     // vlastní následující objekty
00104     CSimpleList<CComObject>         ComObjects;
00105     CSimpleList<CVisObject>         VisObjects;
00106     CComObject*                     ComOwner;
00107     CVisObject*                     VisOwner;
00108     friend class CComObject;
00109     };
00110 
00111 /* KONEC DEFINICE TŘÍD ********************************************************/
00112 
00113 inline void  __fastcall CVisObject::SetName(const CSmallString& name)
00114 {
00115  Name = name;
00116 }
00117 
00118 //------------------------------------------------------------------------------
00119 
00120 inline const CSmallString&  __fastcall CVisObject::GetName(const CSmallString& name) const
00121 {
00122  return(Name);
00123 }
00124 
00125 //------------------------------------------------------------------------------
00126 
00127 inline void  __fastcall CVisObject::SetDescription(const CSmallString& descrip)
00128 {
00129  Description = descrip;
00130 }
00131 
00132 //------------------------------------------------------------------------------
00133 
00134 inline const CSmallString&  __fastcall CVisObject::GetDescription(const CSmallString& name) const
00135 {
00136  return(Description);
00137 }
00138 
00139 //------------------------------------------------------------------------------
00140 
00141 inline const CExtUUID& __fastcall CVisObject::GetType(void) const
00142 {
00143  return(ObjectInfo->GetObjectUUID());
00144 }
00145 
00146 //---------------------------------------------------------------------------
00147 
00148 inline const CExtUUID& __fastcall CVisObject::GetCategory(void) const
00149 {
00150  return(ObjectInfo->GetCategory());
00151 }
00152 
00153 //---------------------------------------------------------------------------
00154 
00155 inline CComObject* __fastcall CVisObject::GetComOwner(void)
00156 {
00157  return(ComOwner);
00158 }
00159 
00160 //---------------------------------------------------------------------------
00161 
00162 #endif

Generated on Sun Feb 9 12:53:51 2003 for NemesisCore by doxygen1.3-rc2