- /*
- * ===========================================================================
- * PRODUCTION $Log: Named_Item_Set_.hpp,v $
- * PRODUCTION Revision 1000.1 2004/04/12 17:19:53 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.5
- * PRODUCTION
- * ===========================================================================
- */
- /* $Id: Named_Item_Set_.hpp,v 1000.1 2004/04/12 17:19:53 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.
- *
- * ===========================================================================
- *
- * File Description:
- * This code is generated by application DATATOOL
- * using specifications from the data definition file
- * 'twebenv.asn'.
- *
- * ATTENTION:
- * Don't edit or check-in this file to the CVS as this file will
- * be overridden (by DATATOOL) without warning!
- * ===========================================================================
- */
- #ifndef NAMED_ITEM_SET_BASE_HPP
- #define NAMED_ITEM_SET_BASE_HPP
- // standard includes
- #include <serial/serialbase.hpp>
- // generated includes
- #include <string>
- // forward declarations
- class CItem_Set;
- class CName;
- // generated classes
- class CNamed_Item_Set_Base : public ncbi::CSerialObject
- {
- typedef ncbi::CSerialObject Tparent;
- public:
- // constructor
- CNamed_Item_Set_Base(void);
- // destructor
- virtual ~CNamed_Item_Set_Base(void);
- // type info
- DECLARE_INTERNAL_TYPE_INFO();
- // types
- typedef CName TName;
- typedef std::string TDb;
- typedef CItem_Set TItem_Set;
- // getters
- // setters
- // mandatory
- // typedef CName TName
- bool IsSetName(void) const;
- bool CanGetName(void) const;
- void ResetName(void);
- const TName& GetName(void) const;
- void SetName(TName& value);
- TName& SetName(void);
- // mandatory
- // typedef std::string TDb
- bool IsSetDb(void) const;
- bool CanGetDb(void) const;
- void ResetDb(void);
- const TDb& GetDb(void) const;
- void SetDb(const TDb& value);
- TDb& SetDb(void);
- // mandatory
- // typedef CItem_Set TItem_Set
- bool IsSetItem_Set(void) const;
- bool CanGetItem_Set(void) const;
- void ResetItem_Set(void);
- const TItem_Set& GetItem_Set(void) const;
- void SetItem_Set(TItem_Set& value);
- TItem_Set& SetItem_Set(void);
- // reset whole object
- virtual void Reset(void);
- private:
- // Prohibit copy constructor and assignment operator
- CNamed_Item_Set_Base(const CNamed_Item_Set_Base&);
- CNamed_Item_Set_Base& operator=(const CNamed_Item_Set_Base&);
- // data
- Uint4 m_set_State[1];
- ncbi::CRef< TName > m_Name;
- TDb m_Db;
- ncbi::CRef< TItem_Set > m_Item_Set;
- };
- ///////////////////////////////////////////////////////////
- ///////////////////// inline methods //////////////////////
- ///////////////////////////////////////////////////////////
- inline
- bool CNamed_Item_Set_Base::IsSetName(void) const
- {
- return m_Name;
- }
- inline
- bool CNamed_Item_Set_Base::CanGetName(void) const
- {
- return IsSetName();
- }
- inline
- const CName& CNamed_Item_Set_Base::GetName(void) const
- {
- if (!CanGetName()) {
- ThrowUnassigned(0);
- }
- return (*m_Name);
- }
- inline
- CName& CNamed_Item_Set_Base::SetName(void)
- {
- return (*m_Name);
- }
- inline
- bool CNamed_Item_Set_Base::IsSetDb(void) const
- {
- return ((m_set_State[0] & 0xc) != 0);
- }
- inline
- bool CNamed_Item_Set_Base::CanGetDb(void) const
- {
- return IsSetDb();
- }
- inline
- const std::string& CNamed_Item_Set_Base::GetDb(void) const
- {
- if (!CanGetDb()) {
- ThrowUnassigned(1);
- }
- return m_Db;
- }
- inline
- void CNamed_Item_Set_Base::SetDb(const std::string& value)
- {
- m_Db = value;
- m_set_State[0] |= 0xc;
- }
- inline
- std::string& CNamed_Item_Set_Base::SetDb(void)
- {
- #ifdef _DEBUG
- if (!IsSetDb()) {
- m_Db = ms_UnassignedStr;
- }
- #endif
- m_set_State[0] |= 0x4;
- return m_Db;
- }
- inline
- bool CNamed_Item_Set_Base::IsSetItem_Set(void) const
- {
- return m_Item_Set;
- }
- inline
- bool CNamed_Item_Set_Base::CanGetItem_Set(void) const
- {
- return IsSetItem_Set();
- }
- inline
- const CItem_Set& CNamed_Item_Set_Base::GetItem_Set(void) const
- {
- if (!CanGetItem_Set()) {
- ThrowUnassigned(2);
- }
- return (*m_Item_Set);
- }
- inline
- CItem_Set& CNamed_Item_Set_Base::SetItem_Set(void)
- {
- return (*m_Item_Set);
- }
- ///////////////////////////////////////////////////////////
- ////////////////// end of inline methods //////////////////
- ///////////////////////////////////////////////////////////
- #endif // NAMED_ITEM_SET_BASE_HPP