⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 propertyitem.h

📁 Amis - A maximum entropy estimator 一个最大熵模型统计工具
💻 H
字号:
////////////////////////////////////////////////////////////////////////////  Copyright (c) 2000, Yusuke Miyao///  You may distribute under the terms of the Artistic License.//////  <id>$Id: PropertyItem.h,v 1.2 2003/05/11 18:12:09 yusuke Exp $///  <collection>Maximum Entropy Estimator</collection>///  <name>PropertyItem.h</name>///  <overview>Program property manager</overview>///  <desc>///  This file provides a class for managing program properties///  specified with program arguments and property files///  </desc>/////////////////////////////////////////////////////////////////////////#ifndef Amis_PropertyItem_h_#define Amis_PropertyItem_h_#include <amis/configure.h>#include <amis/Option.h>AMIS_NAMESPACE_BEGINclass PropertyItemBase {public:  static Initializer< OptionManager* >* OPTION_QUEUE;public:  PropertyItemBase( void ) {}  virtual ~PropertyItemBase() {}};//////////////////////////////////////////////////////////////////////template < class T >class PropertyItem : public Option< T >, PropertyItemBase {public:  PropertyItem( const std::string& n,		const std::string& ln,		const std::string& sn,		const T& def,		const std::string& desc = "",		bool ao = true )    : Option< T >( PropertyItemBase::OPTION_QUEUE,		   n, ln, sn, def, desc, ao ) {}  virtual ~PropertyItem() {}};//////////////////////////////////////////////////////////////////////template < class T >class PropertyItemVector : public OptionVector< T >, PropertyItemBase {public:  PropertyItemVector( const std::string& n,		      const std::string& ln,		      const std::string& sn,		      const std::vector< T >& def,		      const std::string& desc = "",		      bool ao = true )    : OptionVector< T >( PropertyItemBase::OPTION_QUEUE,			 n, ln, sn, def, desc, ao ) {}  virtual ~PropertyItemVector() {}};//////////////////////////////////////////////////////////////////////class PropertyItemToggle : public OptionToggle, PropertyItemBase {public:  PropertyItemToggle( const std::string& n,		      const std::string& ln,		      const std::string& sn,		      bool def = false,		      const std::string& desc = "",		      bool ao = true )    : OptionToggle( PropertyItemBase::OPTION_QUEUE,		    n, ln, sn, def, desc, ao ) {}  virtual ~PropertyItemToggle() {}};//////////////////////////////////////////////////////////////////////template < class T >class PropertyItemNamedInt : public OptionNamedInt< T >, PropertyItemBase {public:  PropertyItemNamedInt( const std::string& n,			const std::string& ln,			const std::string& sn,			const StringHash< T >& names,			T def = 0,			const std::string& desc = "",			bool ao = true )    : OptionNamedInt< T >( PropertyItemBase::OPTION_QUEUE,			   n, ln, sn, names, def, desc, ao ) {}  virtual ~PropertyItemNamedInt() {}};AMIS_NAMESPACE_END#endif // Amis_PropertyItem_h_// end of PropertyItem.h

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -