📄 node.inl
字号:
/* * =========================================================================== * PRODUCTION $Log: node.inl,v $ * PRODUCTION Revision 1000.2 2004/04/01 21:02:03 gouriano * PRODUCTION PRODUCTION: UPGRADED [CORE_002] Dev-tree R1.13 * PRODUCTION * =========================================================================== */#if defined(HTML___NODE__HPP) && !defined(HTML___NODE__INL)#define HTML___NODE__INL/* $Id: node.inl,v 1000.2 2004/04/01 21:02:03 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: Eugene Vasilchenko * */inlineconst string& CNCBINode::GetName(void) const{ return m_Name;}inlinebool CNCBINode::HaveChildren(void) const{#if NCBI_LIGHTWEIGHT_LIST return !m_Children.empty();#else return m_Children.get() != 0;#endif}inlineCNCBINode::TChildren& CNCBINode::Children(void){#if NCBI_LIGHTWEIGHT_LIST return m_Children;#else return *m_Children;#endif}inlineconst CNCBINode::TChildren& CNCBINode::Children(void) const{#if NCBI_LIGHTWEIGHT_LIST return m_Children;#else return *m_Children;#endif}inlineCNCBINode::TChildren& CNCBINode::GetChildren(void){#if NCBI_LIGHTWEIGHT_LIST return m_Children;#else TChildren* children = m_Children.get(); if ( !children ) m_Children.reset(children = new TChildren); return *children;#endif}inlineCNCBINode::TChildren::iterator CNCBINode::ChildBegin(void){ return Children().begin();}inlineCNCBINode::TChildren::iterator CNCBINode::ChildEnd(void){ return Children().end();}inlineCNCBINode* CNCBINode::Node(TChildren::iterator i){ return &**i;}inlineCNCBINode::TChildren::const_iterator CNCBINode::ChildBegin(void) const{ return Children().begin();}inlineCNCBINode::TChildren::const_iterator CNCBINode::ChildEnd(void) const{ return Children().end();}inlineconst CNCBINode* CNCBINode::Node(TChildren::const_iterator i){ return &**i;}inlineCNCBINode* CNCBINode::AppendChild(CNCBINode* child){ if ( child ) { DoAppendChild(child); } return this;}inlineCNCBINode* CNCBINode::AppendChild(CNodeRef& ref){ DoAppendChild(ref.GetPointer()); return this;}inlinebool CNCBINode::HaveAttributes(void) const{ return m_Attributes.get() != 0;}inline CNCBINode::TAttributes& CNCBINode::Attributes(void){ return *m_Attributes;}inline const CNCBINode::TAttributes& CNCBINode::Attributes(void) const{ return *m_Attributes;}inlineCNCBINode::TAttributes& CNCBINode::GetAttributes(void){#if NCBI_LIGHTWEIGHT_LIST return m_Attributes;#else TAttributes* attributes = m_Attributes.get(); if ( !attributes ) { m_Attributes.reset(attributes = new TAttributes); } return *attributes;#endif}inlinevoid CNCBINode::SetAttribute(const string& name, const string& value){ DoSetAttribute(name, value, false);}inlinevoid CNCBINode::SetOptionalAttribute(const string& name, const string& value){ if ( !value.empty() ) { SetAttribute(name, value); }}inlinevoid CNCBINode::SetOptionalAttribute(const string& name, bool value){ if ( value ) { SetAttribute(name); }}inlinevoid CNCBINode::SetOptionalAttribute(const char* name, const string& value){ if ( !value.empty() ) { SetAttribute(name, value); }}inlinevoid CNCBINode::SetOptionalAttribute(const char* name, bool value){ if ( value ) { SetAttribute(name); }}inlinesize_t CNCBINode::GetRepeatCount(void){ return m_RepeatCount;}inlinevoid CNCBINode::SetRepeatCount(size_t count){ m_RepeatCount = count;}inlinevoid CNCBINode::RepeatTag(bool repeat){ m_RepeatTag = repeat;}inlinebool CNCBINode::NeedRepeatTag(void){ return m_RepeatTag;}/* * =========================================================================== * $Log: node.inl,v $ * Revision 1000.2 2004/04/01 21:02:03 gouriano * PRODUCTION: UPGRADED [CORE_002] Dev-tree R1.13 * * Revision 1.13 2004/02/02 14:26:05 ivanov * CNCBINode: added ability to repeat stored context * * Revision 1.12 2003/11/03 17:02:53 ivanov * Some formal code rearrangement. Move log to end. * * Revision 1.11 2001/05/17 14:55:43 lavr * Typos corrected * * Revision 1.10 2000/07/18 17:21:35 vasilche * Added possibility to force output of empty attribute value. * Added caching to CHTML_table, now large tables work much faster. * Changed algorithm of emitting EOL symbols in html output. * * Revision 1.9 2000/03/29 15:50:39 vasilche * Added const version of CRef - CConstRef. * CRef and CConstRef now accept classes inherited from CObject. * * Revision 1.8 2000/03/07 15:40:37 vasilche * Added AppendChild(CNodeRef&) * * Revision 1.7 2000/03/07 15:26:06 vasilche * Removed second definition of CRef. * * Revision 1.6 1999/12/28 18:55:29 vasilche * Reduced size of compiled object files: * 1. avoid inline or implicit virtual methods (especially destructors). * 2. avoid std::string's methods usage in inline methods. * 3. avoid string literals ("xxx") in inline methods. * * Revision 1.5 1999/11/19 15:45:32 vasilche * CNodeRef implemented as CRef<CNCBINode> * * Revision 1.4 1999/10/28 13:40:30 vasilche * Added reference counters to CNCBINode. * * Revision 1.3 1999/01/21 16:18:04 sandomir * minor changes due to NStr namespace to contain string utility functions * * Revision 1.2 1998/12/23 21:20:58 vasilche * Added more HTML tags (almost all). * Importent ones: all lists (OL, UL, DIR, MENU), fonts (FONT, BASEFONT). * * Revision 1.1 1998/12/21 22:24:57 vasilche * A lot of cleaning. * * =========================================================================== */#endif /* def HTML___NODE__HPP && ndef HTML___NODE__INL */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -