/usr/include/pbcopper/cli/Interface.h is in libpbcopper-dev 0.0.1+20161202-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | #ifndef PBCOPPER_CLI_INTERFACE_H
#define PBCOPPER_CLI_INTERFACE_H
#include "pbcopper/Config.h"
#include "pbcopper/cli/Option.h"
#include "pbcopper/cli/PositionalArg.h"
#include "pbcopper/cli/SingleDashMode.h"
#include "pbcopper/cli/toolcontract/Config.h"
#include <memory>
#include <string>
#include <vector>
namespace PacBio {
namespace CLI {
namespace internal { class InterfacePrivate; }
///
/// \brief The Interface class
///
class Interface
{
public:
/// \name Constructors & Related Methods
/// \{
///
/// \brief Interface
/// \param appName
/// \param appDescription
/// \param appVersion
///
Interface(const std::string& appName,
const std::string& appDescription = std::string(),
const std::string& appVersion = std::string());
///
/// \brief Interface
/// \param other
///
Interface(const Interface& other);
~Interface(void);
/// \}
public:
/// \name Application Attributes
/// \{
///
/// \brief ApplicationDescription
/// \return
///
std::string ApplicationDescription(void) const;
///
/// \brief ApplicationName
/// \return
///
std::string ApplicationName(void) const;
///
/// \brief ApplicationVersion
/// \return
///
std::string ApplicationVersion(void) const;
///
/// \brief AlternativeToolContractName
/// \return
///
std::string AlternativeToolContractName(void) const;
/// \}
public:
/// \name Interface Query
/// \{
///
/// \brief ExpectsValue
/// \param optionName
/// \return
///
bool ExpectsValue(const std::string& optionName) const;
///
/// \brief HasOptionRegistered
/// \param optionName
/// \return
///
bool HasOptionRegistered(const std::string& optionName) const;
///
/// \brief HasHelpOptionRegistered
/// \return
///
bool HasHelpOptionRegistered(void) const;
///
/// \brief HasLogLevelOptionRegistered
/// \return
///
bool HasLogLevelOptionRegistered(void) const;
///
/// \brief HasVerboseOptionRegistered
/// \return
///
bool HasVerboseOptionRegistered(void) const;
///
/// \brief HasVersionOptionRegistered
/// \return
///
bool HasVersionOptionRegistered(void) const;
///
/// \brief HelpOption
/// \return
///
const Option& HelpOption(void) const;
///
/// \brief IdForOptionName
/// \param optionName
/// \return
///
std::string IdForOptionName(const std::string& optionName) const;
///
/// \brief IsToolContractEnabled
/// \return
///
bool IsToolContractEnabled(void) const;
///
/// \brief LogLevelOption
/// \return
///
const Option& LogLevelOption(void) const;
///
/// \brief RegisteredOptions
/// \return
///
std::vector<Option> RegisteredOptions(void) const;
///
/// \brief RegisteredPositionalArgs
/// \return
///
std::vector<PositionalArg> RegisteredPositionalArgs(void) const;
///
/// \brief ToolContract
/// \return
///
const ToolContract::Config& ToolContract(void) const;
///
/// \brief VerboseOption
/// \return
///
const Option& VerboseOption(void) const;
///
/// \brief VersionOption
/// \return
///
const Option& VersionOption(void) const;
/// \}
public:
/// \name Application Attributes
/// \{
///
/// \brief ApplicationDescription
/// \param description
/// \return
///
Interface& ApplicationDescription(const std::string& description);
///
/// \brief ApplicationName
/// \param name
/// \return
///
Interface& ApplicationName(const std::string& name);
///
/// \brief ApplicationVersion
/// \param version
/// \return
///
Interface& ApplicationVersion(const std::string& version);
///
/// \brief AlternativeToolContractName
/// This name, if set, will be used as the alternative prefix of the
/// tool contract option prefix and replace the actual ApplicationName.
///
/// \param name
/// \return
///
Interface& AlternativeToolContractName(const std::string& name);
/// \}
public:
/// \name Interface Setup
/// \{
/// \brief AddOption
/// \param option
/// \return
///
Interface& AddOption(const Option& option);
///
/// \brief AddOptions
/// \param options
/// \return
///
Interface& AddOptions(const std::vector<Option>& options);
///
/// \brief AddPositionalArgument
/// \param posArg
/// \return
///
Interface& AddPositionalArgument(const PositionalArg& posArg);
///
/// \brief AddPositionalArguments
/// \param posArgs
/// \return
///
Interface& AddPositionalArguments(const std::vector<PositionalArg>& posArgs);
///
/// \brief AddHelpOption
/// \param option
/// \return
///
Interface& AddHelpOption(const Option& option = Option::DefaultHelpOption());
///
/// \brief AddLogLevelOption
/// \param option
/// \return
///
Interface& AddLogLevelOption(const Option& option = Option::DefaultLogLevelOption());
///
/// \brief AddVerboseOption
/// \param option
/// \return
///
Interface& AddVerboseOption(const Option& option = Option::DefaultVerboseOption());
///
/// \brief AddVersionOption
/// \param option
/// \return
///
Interface& AddVersionOption(const Option& option = Option::DefaultVersionOption());
///
/// \brief EnableToolContract
/// \param tcConfig
/// \return
///
Interface& EnableToolContract(const ToolContract::Config& tcConfig);
/// \}
private:
std::unique_ptr<internal::InterfacePrivate> d_;
};
} // namespace CLI
} // namespace PacBio
#endif // PBCOPPER_CLI_INTERFACE_H
|