00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*- 00002 00003 // -- BEGIN LICENSE BLOCK ---------------------------------------------- 00004 // This file is part of FZIs ic_workspace. 00005 // 00006 // This program is free software licensed under the LGPL 00007 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3). 00008 // You can find a copy of this license in LICENSE folder in the top 00009 // directory of the source code. 00010 // 00011 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany 00012 // 00013 // -- END LICENSE BLOCK ------------------------------------------------ 00014 00015 //---------------------------------------------------------------------- 00024 //---------------------------------------------------------------------- 00025 #ifndef ICL_CORE_CONFIG_GETOPT_PARAMETER_H_INCLUDED 00026 #define ICL_CORE_CONFIG_GETOPT_PARAMETER_H_INCLUDED 00027 00028 #include "icl_core/BaseTypes.h" 00029 #include "icl_core/Vector.h" 00030 #include "icl_core_config/ImportExport.h" 00031 00032 #ifdef _IC_BUILDER_DEPRECATED_STYLE_ 00033 # include "icl_core/Deprecate.h" 00034 #endif 00035 00036 namespace icl_core { 00037 namespace config { 00038 00039 class ICL_CORE_CONFIG_IMPORT_EXPORT GetoptParameter 00040 { 00041 public: 00057 GetoptParameter(const icl_core::String& option, const icl_core::String& short_option, 00058 const icl_core::String& help, bool is_prefix = false); 00059 00061 icl_core::String option() const { return m_option; } 00063 icl_core::String shortOption() const { return m_short_option; } 00065 bool hasValue() const { return m_has_value; } 00067 icl_core::String help() const { return m_help; } 00068 00070 bool isPrefixOption() const { return m_is_prefix; } 00071 00073 #ifdef _IC_BUILDER_DEPRECATED_STYLE_ 00074 00078 ICL_CORE_VC_DEPRECATE_STYLE icl_core::String Option() const ICL_CORE_GCC_DEPRECATE_STYLE; 00082 ICL_CORE_VC_DEPRECATE_STYLE icl_core::String ShortOption() const ICL_CORE_GCC_DEPRECATE_STYLE; 00086 ICL_CORE_VC_DEPRECATE_STYLE bool HasValue() const ICL_CORE_GCC_DEPRECATE_STYLE; 00090 ICL_CORE_VC_DEPRECATE_STYLE icl_core::String Help() const ICL_CORE_GCC_DEPRECATE_STYLE; 00091 00095 ICL_CORE_VC_DEPRECATE_STYLE bool IsPrefixOption() const ICL_CORE_GCC_DEPRECATE_STYLE; 00096 00097 #endif 00098 00099 00100 private: 00101 icl_core::String m_option; 00102 icl_core::String m_short_option; 00103 icl_core::String m_help; 00104 bool m_has_value; 00105 bool m_is_prefix; 00106 }; 00107 00108 typedef icl_core::Vector<GetoptParameter> GetoptParameterList; 00109 00110 } 00111 } 00112 00113 #endif