NCBI C++ ToolKit
Apad_.hpp
Go to the documentation of this file.
00001 /* $Id$
00002  * ===========================================================================
00003  *
00004  *                            PUBLIC DOMAIN NOTICE
00005  *               National Center for Biotechnology Information
00006  *
00007  *  This software/database is a "United States Government Work" under the
00008  *  terms of the United States Copyright Act.  It was written as part of
00009  *  the author's official duties as a United States Government employee and
00010  *  thus cannot be copyrighted.  This software/database is freely available
00011  *  to the public for use. The National Library of Medicine and the U.S.
00012  *  Government have not placed any restriction on its use or reproduction.
00013  *
00014  *  Although all reasonable efforts have been taken to ensure the accuracy
00015  *  and reliability of the software and data, the NLM and the U.S.
00016  *  Government do not and cannot warrant the performance or results that
00017  *  may be obtained by using this software or data. The NLM and the U.S.
00018  *  Government disclaim all warranties, express or implied, including
00019  *  warranties of performance, merchantability or fitness for any particular
00020  *  purpose.
00021  *
00022  *  Please cite the author in any work or product based on this material.
00023  *
00024  * ===========================================================================
00025  *
00026  */
00027 
00028 /// @file Apad_.hpp
00029 /// Data storage class.
00030 ///
00031 /// This file was generated by application DATATOOL
00032 /// using the following specifications:
00033 /// <a href="http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/lxr/source/src/objtools/eutils/linkout/linkout.dtd">linkout.dtd</a>
00034 /// and additional tune-up parameters:
00035 /// <a href="http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/lxr/source/src/objtools/eutils/linkout/linkout.def">linkout.def</a>
00036 ///
00037 /// ATTENTION:
00038 ///   Don't edit or commit this file into CVS as this file will
00039 ///   be overridden (by DATATOOL) without warning!
00040 
00041 #ifndef linkout__OBJTOOLS_EUTILS_LINKOUT_APAD_BASE_HPP
00042 #define linkout__OBJTOOLS_EUTILS_LINKOUT_APAD_BASE_HPP
00043 
00044 // standard includes
00045 #include <serial/serialbase.hpp>
00046 
00047 // generated includes
00048 #include <list>
00049 #include <string>
00050 
00051 #ifndef BEGIN_linkout_SCOPE
00052 #  define BEGIN_linkout_SCOPE BEGIN_SCOPE(linkout)
00053 #  define END_linkout_SCOPE END_SCOPE(linkout)
00054 #endif
00055 BEGIN_linkout_SCOPE // namespace linkout::
00056 
00057 
00058 // forward declarations
00059 class CApad;
00060 class CNormalize;
00061 class CPad;
00062 class CStrip;
00063 class CSubs;
00064 class CTolower;
00065 class CToupper;
00066 
00067 
00068 // generated classes
00069 
00070 
00071 /** @addtogroup dataspec_linkout
00072  *
00073  * @{
00074  */
00075 
00076 /////////////////////////////////////////////////////////////////////////////
00077 ///
00078 /// CApad_Base --
00079 ///
00080 
00081 class NCBI_EUTILS_EXPORT CApad_Base : public NCBI_NS_NCBI::CSerialObject
00082 {
00083     typedef NCBI_NS_NCBI::CSerialObject Tparent;
00084 public:
00085     // constructor
00086     CApad_Base(void);
00087     // destructor
00088     virtual ~CApad_Base(void);
00089 
00090     // type info
00091     DECLARE_INTERNAL_TYPE_INFO();
00092 
00093     /////////////////////////////////////////////////////////////////////////////
00094     ///
00095     /// C_Attlist --
00096     ///
00097     
00098     class NCBI_EUTILS_EXPORT C_Attlist : public NCBI_NS_NCBI::CSerialObject
00099     {
00100         typedef NCBI_NS_NCBI::CSerialObject Tparent;
00101     public:
00102         // constructor
00103         C_Attlist(void);
00104         // destructor
00105         ~C_Attlist(void);
00106     
00107         // type info
00108         DECLARE_INTERNAL_TYPE_INFO();
00109     
00110         enum EAttlist_align {
00111             eAttlist_align_left  = 1,
00112             eAttlist_align_right = 2
00113         };
00114         
00115         /// Access to EAttlist_align's attributes (values, names) as defined in spec
00116         static const NCBI_NS_NCBI::CEnumeratedTypeValues* ENUM_METHOD_NAME(EAttlist_align)(void);
00117         
00118         // types
00119         typedef NCBI_NS_STD::string TWith;
00120         typedef NCBI_NS_STD::string TWidth;
00121         typedef EAttlist_align TAlign;
00122     
00123         // getters
00124         // setters
00125     
00126         /// Check if a value has been assigned to With data member.
00127         ///
00128         /// Data member With is mandatory;
00129         /// its type is defined as 'typedef NCBI_NS_STD::string TWith'
00130         /// @return
00131         ///   - true, if a value has been assigned.
00132         ///   - false, otherwise.
00133         bool IsSetWith(void) const;
00134     
00135         /// Check if it is safe to call GetWith method.
00136         ///
00137         /// @return
00138         ///   - true, if the data member is getatable.
00139         ///   - false, otherwise.
00140         bool CanGetWith(void) const;
00141     
00142         /// Reset With data member.
00143         void ResetWith(void);
00144     
00145         /// Get the With member data.
00146         ///
00147         /// @return
00148         ///   Reference to the member data.
00149         const TWith& GetWith(void) const;
00150     
00151         /// Assign a value to With data member.
00152         ///
00153         /// @param value
00154         ///   Value to assign
00155         void SetWith(const TWith& value);
00156     
00157         /// Assign a value to With data member.
00158         ///
00159         /// @return
00160         ///   Reference to the data value.
00161         TWith& SetWith(void);
00162     
00163         /// Check if a value has been assigned to Width data member.
00164         ///
00165         /// Data member Width is mandatory;
00166         /// its type is defined as 'typedef NCBI_NS_STD::string TWidth'
00167         /// @return
00168         ///   - true, if a value has been assigned.
00169         ///   - false, otherwise.
00170         bool IsSetWidth(void) const;
00171     
00172         /// Check if it is safe to call GetWidth method.
00173         ///
00174         /// @return
00175         ///   - true, if the data member is getatable.
00176         ///   - false, otherwise.
00177         bool CanGetWidth(void) const;
00178     
00179         /// Reset Width data member.
00180         void ResetWidth(void);
00181     
00182         /// Get the Width member data.
00183         ///
00184         /// @return
00185         ///   Reference to the member data.
00186         const TWidth& GetWidth(void) const;
00187     
00188         /// Assign a value to Width data member.
00189         ///
00190         /// @param value
00191         ///   Value to assign
00192         void SetWidth(const TWidth& value);
00193     
00194         /// Assign a value to Width data member.
00195         ///
00196         /// @return
00197         ///   Reference to the data value.
00198         TWidth& SetWidth(void);
00199     
00200         /// Check if a value has been assigned to Align data member.
00201         ///
00202         /// Data member Align is mandatory with default eAttlist_align_right;
00203         /// its type is defined as 'typedef EAttlist_align TAlign'
00204         /// @return
00205         ///   - true, if a value has been assigned.
00206         ///   - false, otherwise.
00207         bool IsSetAlign(void) const;
00208     
00209         /// Check if it is safe to call GetAlign method.
00210         ///
00211         /// @return
00212         ///   - true, if the data member is getatable.
00213         ///   - false, otherwise.
00214         bool CanGetAlign(void) const;
00215     
00216         /// Reset Align data member.
00217         void ResetAlign(void);
00218     
00219         /// Get the Align member data.
00220         ///
00221         /// @return
00222         ///   Copy of the member data.
00223         TAlign GetAlign(void) const;
00224     
00225         /// Assign a value to Align data member.
00226         ///
00227         /// @param value
00228         ///   Value to assign
00229         void SetAlign(TAlign value);
00230     
00231         /// Assign a value to Align data member.
00232         ///
00233         /// @return
00234         ///   Reference to the data value.
00235         TAlign& SetAlign(void);
00236     
00237         /// Reset the whole object
00238         void Reset(void);
00239     
00240     
00241     private:
00242         // Prohibit copy constructor and assignment operator
00243         C_Attlist(const C_Attlist&);
00244         C_Attlist& operator=(const C_Attlist&);
00245     
00246         // data
00247         Uint4 m_set_State[1];
00248         TWith m_With;
00249         TWidth m_Width;
00250         TAlign m_Align;
00251     };
00252     /////////////////////////////////////////////////////////////////////////////
00253     ///
00254     /// C_E_Apad --
00255     ///
00256     
00257     class NCBI_EUTILS_EXPORT C_E_Apad : public NCBI_NS_NCBI::CSerialObject
00258     {
00259         typedef NCBI_NS_NCBI::CSerialObject Tparent;
00260     public:
00261         // constructor
00262         C_E_Apad(void);
00263         // destructor
00264         ~C_E_Apad(void);
00265     
00266         // type info
00267         DECLARE_INTERNAL_TYPE_INFO();
00268     
00269     
00270         /// Choice variants.
00271         enum E_Choice {
00272             e_not_set = 0,  ///< No variant selected
00273             e__CharData,
00274             e_Pad,
00275             e_Apad,
00276             e_Subs,
00277             e_Toupper,
00278             e_Tolower,
00279             e_Strip,
00280             e_Normalize
00281         };
00282         /// Maximum+1 value of the choice variant enumerator.
00283         enum E_ChoiceStopper {
00284             e_MaxChoice = 9 ///< == e_Normalize+1
00285         };
00286     
00287         /// Reset the whole object
00288         void Reset(void);
00289     
00290         /// Reset the selection (set it to e_not_set).
00291         void ResetSelection(void);
00292     
00293         /// Which variant is currently selected.
00294         ///
00295         /// @return
00296         ///   Choice state enumerator.
00297         E_Choice Which(void) const;
00298     
00299         /// Verify selection, throw exception if it differs from the expected.
00300         ///
00301         /// @param index
00302         ///   Expected selection.
00303         void CheckSelected(E_Choice index) const;
00304     
00305         /// Throw 'InvalidSelection' exception.
00306         ///
00307         /// @param index
00308         ///   Expected selection.
00309         NCBI_NORETURN void ThrowInvalidSelection(E_Choice index) const;
00310     
00311         /// Retrieve selection name (for diagnostic purposes).
00312         ///
00313         /// @param index
00314         ///   One of possible selection states.
00315         /// @return
00316         ///   Name string.
00317         static NCBI_NS_STD::string SelectionName(E_Choice index);
00318     
00319         /// Select the requested variant if needed.
00320         ///
00321         /// @param index
00322         ///   New selection state.
00323         /// @param reset
00324         ///   Flag that defines the resetting of the variant data. The data will
00325         ///   be reset if either the current selection differs from the new one,
00326         ///   or the flag is set to eDoResetVariant.
00327         void Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset = NCBI_NS_NCBI::eDoResetVariant);
00328         /// Select the requested variant if needed,
00329         /// allocating CObject variants from memory pool.
00330         void Select(E_Choice index,
00331                     NCBI_NS_NCBI::EResetVariant reset,
00332                     NCBI_NS_NCBI::CObjectMemoryPool* pool);
00333     
00334         // types
00335         typedef NCBI_NS_STD::string T_CharData;
00336         typedef CPad TPad;
00337         typedef CApad TApad;
00338         typedef CSubs TSubs;
00339         typedef CToupper TToupper;
00340         typedef CTolower TTolower;
00341         typedef CStrip TStrip;
00342         typedef CNormalize TNormalize;
00343     
00344         // getters
00345         // setters
00346     
00347     
00348         /// Check if variant _CharData is selected.
00349         ///
00350         /// _CharData type is defined as 'typedef NCBI_NS_STD::string T_CharData'.
00351         /// @return
00352         ///   - true, if the variant is selected.
00353         ///   - false, otherwise.
00354         bool Is_CharData(void) const;
00355     
00356         /// Get the variant data.
00357         ///
00358         /// @return
00359         ///   Reference to the data.
00360         const T_CharData& Get_CharData(void) const;
00361     
00362         /// Select the variant.
00363         ///
00364         /// @return
00365         ///   Reference to the variant data.
00366         T_CharData& Set_CharData(void);
00367     
00368         /// Select the variant and set its data.
00369         ///
00370         /// @param value
00371         ///   Variant data.
00372         void Set_CharData(const T_CharData& value);
00373     
00374     
00375         /// Check if variant Pad is selected.
00376         ///
00377         /// Pad type is defined as 'typedef CPad TPad'.
00378         /// @return
00379         ///   - true, if the variant is selected.
00380         ///   - false, otherwise.
00381         bool IsPad(void) const;
00382     
00383         /// Get the variant data.
00384         ///
00385         /// @return
00386         ///   Reference to the data.
00387         const TPad& GetPad(void) const;
00388     
00389         /// Select the variant.
00390         ///
00391         /// @return
00392         ///   Reference to the variant data.
00393         TPad& SetPad(void);
00394         /// Select the variant and set its data.
00395         ///
00396         /// @param value
00397         ///   Reference to the data.
00398         void SetPad(TPad& value);
00399     
00400     
00401         /// Check if variant Apad is selected.
00402         ///
00403         /// Apad type is defined as 'typedef CApad TApad'.
00404         /// @return
00405         ///   - true, if the variant is selected.
00406         ///   - false, otherwise.
00407         bool IsApad(void) const;
00408     
00409         /// Get the variant data.
00410         ///
00411         /// @return
00412         ///   Reference to the data.
00413         const TApad& GetApad(void) const;
00414     
00415         /// Select the variant.
00416         ///
00417         /// @return
00418         ///   Reference to the variant data.
00419         TApad& SetApad(void);
00420         /// Select the variant and set its data.
00421         ///
00422         /// @param value
00423         ///   Reference to the data.
00424         void SetApad(TApad& value);
00425     
00426     
00427         /// Check if variant Subs is selected.
00428         ///
00429         /// Subs type is defined as 'typedef CSubs TSubs'.
00430         /// @return
00431         ///   - true, if the variant is selected.
00432         ///   - false, otherwise.
00433         bool IsSubs(void) const;
00434     
00435         /// Get the variant data.
00436         ///
00437         /// @return
00438         ///   Reference to the data.
00439         const TSubs& GetSubs(void) const;
00440     
00441         /// Select the variant.
00442         ///
00443         /// @return
00444         ///   Reference to the variant data.
00445         TSubs& SetSubs(void);
00446         /// Select the variant and set its data.
00447         ///
00448         /// @param value
00449         ///   Reference to the data.
00450         void SetSubs(TSubs& value);
00451     
00452     
00453         /// Check if variant Toupper is selected.
00454         ///
00455         /// Toupper type is defined as 'typedef CToupper TToupper'.
00456         /// @return
00457         ///   - true, if the variant is selected.
00458         ///   - false, otherwise.
00459         bool IsToupper(void) const;
00460     
00461         /// Get the variant data.
00462         ///
00463         /// @return
00464         ///   Reference to the data.
00465         const TToupper& GetToupper(void) const;
00466     
00467         /// Select the variant.
00468         ///
00469         /// @return
00470         ///   Reference to the variant data.
00471         TToupper& SetToupper(void);
00472         /// Select the variant and set its data.
00473         ///
00474         /// @param value
00475         ///   Reference to the data.
00476         void SetToupper(TToupper& value);
00477     
00478     
00479         /// Check if variant Tolower is selected.
00480         ///
00481         /// Tolower type is defined as 'typedef CTolower TTolower'.
00482         /// @return
00483         ///   - true, if the variant is selected.
00484         ///   - false, otherwise.
00485         bool IsTolower(void) const;
00486     
00487         /// Get the variant data.
00488         ///
00489         /// @return
00490         ///   Reference to the data.
00491         const TTolower& GetTolower(void) const;
00492     
00493         /// Select the variant.
00494         ///
00495         /// @return
00496         ///   Reference to the variant data.
00497         TTolower& SetTolower(void);
00498         /// Select the variant and set its data.
00499         ///
00500         /// @param value
00501         ///   Reference to the data.
00502         void SetTolower(TTolower& value);
00503     
00504     
00505         /// Check if variant Strip is selected.
00506         ///
00507         /// Strip type is defined as 'typedef CStrip TStrip'.
00508         /// @return
00509         ///   - true, if the variant is selected.
00510         ///   - false, otherwise.
00511         bool IsStrip(void) const;
00512     
00513         /// Get the variant data.
00514         ///
00515         /// @return
00516         ///   Reference to the data.
00517         const TStrip& GetStrip(void) const;
00518     
00519         /// Select the variant.
00520         ///
00521         /// @return
00522         ///   Reference to the variant data.
00523         TStrip& SetStrip(void);
00524         /// Select the variant and set its data.
00525         ///
00526         /// @param value
00527         ///   Reference to the data.
00528         void SetStrip(TStrip& value);
00529     
00530     
00531         /// Check if variant Normalize is selected.
00532         ///
00533         /// Normalize type is defined as 'typedef CNormalize TNormalize'.
00534         /// @return
00535         ///   - true, if the variant is selected.
00536         ///   - false, otherwise.
00537         bool IsNormalize(void) const;
00538     
00539         /// Get the variant data.
00540         ///
00541         /// @return
00542         ///   Reference to the data.
00543         const TNormalize& GetNormalize(void) const;
00544     
00545         /// Select the variant.
00546         ///
00547         /// @return
00548         ///   Reference to the variant data.
00549         TNormalize& SetNormalize(void);
00550         /// Select the variant and set its data.
00551         ///
00552         /// @param value
00553         ///   Reference to the data.
00554         void SetNormalize(TNormalize& value);
00555     
00556     
00557     private:
00558         // copy constructor and assignment operator
00559         C_E_Apad(const C_E_Apad& );
00560         C_E_Apad& operator=(const C_E_Apad& );
00561         // choice state
00562         E_Choice m_choice;
00563         // helper methods
00564         void DoSelect(E_Choice index, NCBI_NS_NCBI::CObjectMemoryPool* pool = 0);
00565     
00566         static const char* const sm_SelectionNames[];
00567         // data
00568         union {
00569             NCBI_NS_NCBI::CUnionBuffer<NCBI_NS_STD::string> m_string;
00570             NCBI_NS_NCBI::CSerialObject *m_object;
00571         };
00572     };
00573     // types
00574     typedef C_Attlist TAttlist;
00575     typedef C_E_Apad C_E;
00576     typedef NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_E_Apad > > TApad;
00577 
00578     // getters
00579     // setters
00580 
00581     /// used to mark up strings that require padding to create fixed-length string
00582     ///     attributes. It skips all preceding alpha characters before padding 
00583     /// Check if a value has been assigned to Attlist data member.
00584     ///
00585     /// Data member Attlist is mandatory;
00586     /// its type is defined as 'typedef C_Attlist TAttlist'
00587     /// @return
00588     ///   - true, if a value has been assigned.
00589     ///   - false, otherwise.
00590     bool IsSetAttlist(void) const;
00591 
00592     /// Check if it is safe to call GetAttlist method.
00593     ///
00594     /// @return
00595     ///   - true, if the data member is getatable.
00596     ///   - false, otherwise.
00597     bool CanGetAttlist(void) const;
00598 
00599     /// Reset Attlist data member.
00600     void ResetAttlist(void);
00601 
00602     /// Get the Attlist member data.
00603     ///
00604     /// @return
00605     ///   Reference to the member data.
00606     const TAttlist& GetAttlist(void) const;
00607 
00608     /// Assign a value to Attlist data member.
00609     ///
00610     /// @param value
00611     ///   Reference to value.
00612     void SetAttlist(TAttlist& value);
00613 
00614     /// Assign a value to Attlist data member.
00615     ///
00616     /// @return
00617     ///   Reference to the data value.
00618     TAttlist& SetAttlist(void);
00619 
00620     /// Check if a value has been assigned to Apad data member.
00621     ///
00622     /// Data member Apad is optional;
00623     /// its type is defined as 'typedef NCBI_NS_STD::list< NCBI_NS_NCBI::CRef< C_E_Apad > > TApad'
00624     /// @return
00625     ///   - true, if a value has been assigned.
00626     ///   - false, otherwise.
00627     bool IsSetApad(void) const;
00628 
00629     /// Check if it is safe to call GetApad method.
00630     ///
00631     /// @return
00632     ///   - true, if the data member is getatable.
00633     ///   - false, otherwise.
00634     bool CanGetApad(void) const;
00635 
00636     /// Reset Apad data member.
00637     void ResetApad(void);
00638 
00639     /// Get the Apad member data.
00640     ///
00641     /// @return
00642     ///   Reference to the member data.
00643     const TApad& GetApad(void) const;
00644 
00645     /// Assign a value to Apad data member.
00646     ///
00647     /// @return
00648     ///   Reference to the data value.
00649     TApad& SetApad(void);
00650 
00651     /// Reset the whole object
00652     virtual void Reset(void);
00653 
00654 
00655 private:
00656     // Prohibit copy constructor and assignment operator
00657     CApad_Base(const CApad_Base&);
00658     CApad_Base& operator=(const CApad_Base&);
00659 
00660     // data
00661     Uint4 m_set_State[1];
00662     NCBI_NS_NCBI::CRef< TAttlist > m_Attlist;
00663     TApad m_Apad;
00664 };
00665 
00666 /* @} */
00667 
00668 
00669 
00670 
00671 
00672 ///////////////////////////////////////////////////////////
00673 ///////////////////// inline methods //////////////////////
00674 ///////////////////////////////////////////////////////////
00675 inline
00676 bool CApad_Base::C_Attlist::IsSetWith(void) const
00677 {
00678     return ((m_set_State[0] & 0x3) != 0);
00679 }
00680 
00681 inline
00682 bool CApad_Base::C_Attlist::CanGetWith(void) const
00683 {
00684     return IsSetWith();
00685 }
00686 
00687 inline
00688 const CApad_Base::C_Attlist::TWith& CApad_Base::C_Attlist::GetWith(void) const
00689 {
00690     if (!CanGetWith()) {
00691         ThrowUnassigned(0);
00692     }
00693     return m_With;
00694 }
00695 
00696 inline
00697 void CApad_Base::C_Attlist::SetWith(const CApad_Base::C_Attlist::TWith& value)
00698 {
00699     m_With = value;
00700     m_set_State[0] |= 0x3;
00701 }
00702 
00703 inline
00704 CApad_Base::C_Attlist::TWith& CApad_Base::C_Attlist::SetWith(void)
00705 {
00706 #ifdef _DEBUG
00707     if (!IsSetWith()) {
00708         m_With = ms_UnassignedStr;
00709     }
00710 #endif
00711     m_set_State[0] |= 0x1;
00712     return m_With;
00713 }
00714 
00715 inline
00716 bool CApad_Base::C_Attlist::IsSetWidth(void) const
00717 {
00718     return ((m_set_State[0] & 0xc) != 0);
00719 }
00720 
00721 inline
00722 bool CApad_Base::C_Attlist::CanGetWidth(void) const
00723 {
00724     return IsSetWidth();
00725 }
00726 
00727 inline
00728 const CApad_Base::C_Attlist::TWidth& CApad_Base::C_Attlist::GetWidth(void) const
00729 {
00730     if (!CanGetWidth()) {
00731         ThrowUnassigned(1);
00732     }
00733     return m_Width;
00734 }
00735 
00736 inline
00737 void CApad_Base::C_Attlist::SetWidth(const CApad_Base::C_Attlist::TWidth& value)
00738 {
00739     m_Width = value;
00740     m_set_State[0] |= 0xc;
00741 }
00742 
00743 inline
00744 CApad_Base::C_Attlist::TWidth& CApad_Base::C_Attlist::SetWidth(void)
00745 {
00746 #ifdef _DEBUG
00747     if (!IsSetWidth()) {
00748         m_Width = ms_UnassignedStr;
00749     }
00750 #endif
00751     m_set_State[0] |= 0x4;
00752     return m_Width;
00753 }
00754 
00755 inline
00756 bool CApad_Base::C_Attlist::IsSetAlign(void) const
00757 {
00758     return ((m_set_State[0] & 0x30) != 0);
00759 }
00760 
00761 inline
00762 bool CApad_Base::C_Attlist::CanGetAlign(void) const
00763 {
00764     return true;
00765 }
00766 
00767 inline
00768 void CApad_Base::C_Attlist::ResetAlign(void)
00769 {
00770     m_Align = eAttlist_align_right;
00771     m_set_State[0] &= ~0x30;
00772 }
00773 
00774 inline
00775 CApad_Base::C_Attlist::TAlign CApad_Base::C_Attlist::GetAlign(void) const
00776 {
00777     return m_Align;
00778 }
00779 
00780 inline
00781 void CApad_Base::C_Attlist::SetAlign(CApad_Base::C_Attlist::TAlign value)
00782 {
00783     m_Align = value;
00784     m_set_State[0] |= 0x30;
00785 }
00786 
00787 inline
00788 CApad_Base::C_Attlist::TAlign& CApad_Base::C_Attlist::SetAlign(void)
00789 {
00790 #ifdef _DEBUG
00791     if (!IsSetAlign()) {
00792         memset(&m_Align,ms_UnassignedByte,sizeof(m_Align));
00793     }
00794 #endif
00795     m_set_State[0] |= 0x10;
00796     return m_Align;
00797 }
00798 
00799 inline
00800 CApad_Base::C_E_Apad::E_Choice CApad_Base::C_E_Apad::Which(void) const
00801 {
00802     return m_choice;
00803 }
00804 
00805 inline
00806 void CApad_Base::C_E_Apad::CheckSelected(E_Choice index) const
00807 {
00808     if ( m_choice != index )
00809         ThrowInvalidSelection(index);
00810 }
00811 
00812 inline
00813 void CApad_Base::C_E_Apad::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset, NCBI_NS_NCBI::CObjectMemoryPool* pool)
00814 {
00815     if ( reset == NCBI_NS_NCBI::eDoResetVariant || m_choice != index ) {
00816         if ( m_choice != e_not_set )
00817             ResetSelection();
00818         DoSelect(index, pool);
00819     }
00820 }
00821 
00822 inline
00823 void CApad_Base::C_E_Apad::Select(E_Choice index, NCBI_NS_NCBI::EResetVariant reset)
00824 {
00825     Select(index, reset, 0);
00826 }
00827 
00828 inline
00829 bool CApad_Base::C_E_Apad::Is_CharData(void) const
00830 {
00831     return m_choice == e__CharData;
00832 }
00833 
00834 inline
00835 const CApad_Base::C_E_Apad::T_CharData& CApad_Base::C_E_Apad::Get_CharData(void) const
00836 {
00837     CheckSelected(e__CharData);
00838     return *m_string;
00839 }
00840 
00841 inline
00842 CApad_Base::C_E_Apad::T_CharData& CApad_Base::C_E_Apad::Set_CharData(void)
00843 {
00844     Select(e__CharData, NCBI_NS_NCBI::eDoNotResetVariant);
00845     return *m_string;
00846 }
00847 
00848 inline
00849 bool CApad_Base::C_E_Apad::IsPad(void) const
00850 {
00851     return m_choice == e_Pad;
00852 }
00853 
00854 inline
00855 bool CApad_Base::C_E_Apad::IsApad(void) const
00856 {
00857     return m_choice == e_Apad;
00858 }
00859 
00860 inline
00861 bool CApad_Base::C_E_Apad::IsSubs(void) const
00862 {
00863     return m_choice == e_Subs;
00864 }
00865 
00866 inline
00867 bool CApad_Base::C_E_Apad::IsToupper(void) const
00868 {
00869     return m_choice == e_Toupper;
00870 }
00871 
00872 inline
00873 bool CApad_Base::C_E_Apad::IsTolower(void) const
00874 {
00875     return m_choice == e_Tolower;
00876 }
00877 
00878 inline
00879 bool CApad_Base::C_E_Apad::IsStrip(void) const
00880 {
00881     return m_choice == e_Strip;
00882 }
00883 
00884 inline
00885 bool CApad_Base::C_E_Apad::IsNormalize(void) const
00886 {
00887     return m_choice == e_Normalize;
00888 }
00889 
00890 inline
00891 bool CApad_Base::IsSetAttlist(void) const
00892 {
00893     return m_Attlist.NotEmpty();
00894 }
00895 
00896 inline
00897 bool CApad_Base::CanGetAttlist(void) const
00898 {
00899     return true;
00900 }
00901 
00902 inline
00903 const CApad_Base::TAttlist& CApad_Base::GetAttlist(void) const
00904 {
00905     if ( !m_Attlist ) {
00906         const_cast<CApad_Base*>(this)->ResetAttlist();
00907     }
00908     return (*m_Attlist);
00909 }
00910 
00911 inline
00912 CApad_Base::TAttlist& CApad_Base::SetAttlist(void)
00913 {
00914     if ( !m_Attlist ) {
00915         ResetAttlist();
00916     }
00917     return (*m_Attlist);
00918 }
00919 
00920 inline
00921 bool CApad_Base::IsSetApad(void) const
00922 {
00923     return ((m_set_State[0] & 0xc) != 0);
00924 }
00925 
00926 inline
00927 bool CApad_Base::CanGetApad(void) const
00928 {
00929     return true;
00930 }
00931 
00932 inline
00933 const CApad_Base::TApad& CApad_Base::GetApad(void) const
00934 {
00935     return m_Apad;
00936 }
00937 
00938 inline
00939 CApad_Base::TApad& CApad_Base::SetApad(void)
00940 {
00941     m_set_State[0] |= 0x4;
00942     return m_Apad;
00943 }
00944 
00945 ///////////////////////////////////////////////////////////
00946 ////////////////// end of inline methods //////////////////
00947 ///////////////////////////////////////////////////////////
00948 
00949 
00950 
00951 
00952 
00953 END_linkout_SCOPE // namespace linkout::
00954 
00955 
00956 #endif // linkout__OBJTOOLS_EUTILS_LINKOUT_APAD_BASE_HPP
Modified on Wed May 23 13:34:51 2012 by modify_doxy.py rev. 337098