PluginObject.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:5k
- /*
- * ===========================================================================
- * PRODUCTION $Log: PluginObject.hpp,v $
- * PRODUCTION Revision 1000.1 2004/04/12 18:14:47 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.2
- * PRODUCTION
- * ===========================================================================
- */
- /* $Id: PluginObject.hpp,v 1000.1 2004/04/12 18:14:47 gouriano Exp $
- * ===========================================================================
- *
- * PUBLIC DOMAIN NOTICE
- * National Center for Biotechnology Information
- *
- * This software/database is a "United States Government Work" under the
- * terms of the United States Copyright Act. It was written as part of
- * the author's official duties as a United States Government employee and
- * thus cannot be copyrighted. This software/database is freely available
- * to the public for use. The National Library of Medicine and the U.S.
- * Government have not placed any restriction on its use or reproduction.
- *
- * Although all reasonable efforts have been taken to ensure the accuracy
- * and reliability of the software and data, the NLM and the U.S.
- * Government do not and cannot warrant the performance or results that
- * may be obtained by using this software or data. The NLM and the U.S.
- * Government disclaim all warranties, express or implied, including
- * warranties of performance, merchantability or fitness for any particular
- * purpose.
- *
- * Please cite the author in any work or product based on this material.
- *
- * ===========================================================================
- *
- * Author: .......
- *
- * File Description:
- * .......
- *
- * Remark:
- * This code was originally generated by application DATATOOL
- * using specifications from the data definition file
- * 'plugin.asn'.
- */
- #ifndef GUI_PLUGIN_PLUGINOBJECT_HPP
- #define GUI_PLUGIN_PLUGINOBJECT_HPP
- // generated includes
- #include <gui/core/idocument.hpp>
- #include <gui/plugin/PluginObject_.hpp>
- // generated classes
- BEGIN_NCBI_SCOPE
- BEGIN_objects_SCOPE // namespace ncbi::objects::
- class NCBI_XGBPLUGIN_EXPORT CPluginObject
- : public CPluginObject_Base, public CSerialUserOp
- {
- typedef CPluginObject_Base Tparent;
- public:
- // constructor
- CPluginObject(void);
- // destructor
- ~CPluginObject(void);
- // overloaded Reset() - allows us to clear our derived types
- void Reset(void);
- // PostRead() - provides ability to set derived type
- void PostRead();
- // access the document for this object
- const IDocument* GetDocument(void) const;
- // access the object for this object
- const CObject* GetObject(void) const;
- // find out if this object is empty
- bool IsEmpty(void) const;
- void SetDocument(const IDocument* doc);
- void SetObject(const string& type);
- void SetObject(const CTypeInfo* info = NULL);
- void SetObject(const IDocument* doc, const CObject* obj);
- protected:
- // From CSerialUserOp
- virtual void UserOp_Assign(const CSerialUserOp& source);
- virtual bool UserOp_Equals(const CSerialUserOp& object) const;
- // we must hold CConstRef<>s of our object to make sure they don't
- // fall out of scope
- CConstRef<IDocument> m_Document;
- CConstRef<CObject> m_Object;
- private:
- // Prohibit copy constructor and assignment operator
- CPluginObject(const CPluginObject& value);
- CPluginObject& operator=(const CPluginObject& value);
- };
- /////////////////// CPluginObject inline methods
- // constructor
- inline
- CPluginObject::CPluginObject(void)
- {
- }
- inline
- const IDocument* CPluginObject::GetDocument(void) const
- {
- return m_Document.GetPointer();
- }
- inline
- const CObject* CPluginObject::GetObject(void) const
- {
- return m_Object.GetPointer();
- }
- inline
- bool CPluginObject::IsEmpty(void) const
- {
- return ( !m_Document && !m_Object );
- }
- /////////////////// end of CPluginObject inline methods
- END_objects_SCOPE // namespace ncbi::objects::
- END_NCBI_SCOPE
- NCBISER_HAVE_POST_READ(ncbi::objects::CPluginObject)
- /*
- * ===========================================================================
- *
- * $Log: PluginObject.hpp,v $
- * Revision 1000.1 2004/04/12 18:14:47 gouriano
- * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.2
- *
- * Revision 1.2 2004/02/03 21:23:09 dicuccio
- * Added ClearObjects(). Added SetObjects() with string-based descriptor
- *
- * Revision 1.1 2003/10/27 17:32:19 dicuccio
- * Introduced CPluginObject to hold CPluginValue types when the type is an object.
- * Made CPluginValue a variant; removed ad hoc URL encoding
- *
- *
- * ===========================================================================
- */
- #endif // GUI_PLUGIN_PLUGINOBJECT_HPP
- /* Original file checksum: lines: 93, chars: 2452, CRC32: c82dc3f1 */