/usr/include/pbcopper/cli/Results.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 | #ifndef PBCOPPER_CLI_RESULTS_H
#define PBCOPPER_CLI_RESULTS_H
#include "pbcopper/Config.h"
#include "pbcopper/cli/Interface.h"
#include "pbcopper/cli/Option.h"
#include "pbcopper/logging/Logging.h"
#include "pbcopper/json/JSON.h"
#include <string>
#include <unordered_map>
#include <vector>
namespace PacBio {
namespace CLI {
namespace internal { class ResultsPrivate; }
///
/// \brief The Results class
///
class Results
{
public:
using Result = JSON::Json;
public:
/// \name Constructors & Related Methods
/// \{
///
/// \brief Results
/// \param interface
///
Results(const Interface& interface);
Results(const Interface& interface,
const std::vector<std::string>& inputCommandLine);
Results(const Results& other);
Results& operator=(const Results& other);
~Results(void);
/// \}
public:
/// \name CLI Results Query
/// \{
///
/// \brief ApplicationInterface
/// \return
///
const Interface& ApplicationInterface(void) const;
///
/// \brief InputCommandLine
/// \return
///
std::string InputCommandLine(void) const;
///
/// \brief IsFromRTC
/// \return true if this Results object generated from a resolved tool
/// contract (as opposed to command-line args)
///
bool IsFromRTC(void) const;
///
/// \brief LogLevel
///
/// Default level
///
/// \note Currently only set by resolved tool contract. Setting from
/// command-line will follow shortly.
///
/// \return
///
PacBio::Logging::LogLevel LogLevel(void) const;
///
/// \brief NumProcessors
///
/// \note Currently, this field is \b only populated when the Results
/// object was created from a resolved tool contract.
///
/// \sa IsFromRTC to check if this will be available
///
/// \return number of processors specified by resolved tool contract.
///
uint16_t NumProcessors(void) const;
///
/// \brief PositionalArguments
/// \return
///
std::vector<std::string> PositionalArguments(void) const;
// std::string PositionalArgument(const std::string& posArgName) const;
///
/// \brief operator []
/// \param optionId
/// \return
///
const Result& operator[](const std::string& optionId) const;
///
/// \brief operator []
/// \param id
/// \return
///
Result& operator[](const std::string& id);
/// \}
public:
/// \name Results Construction
/// \{
///
/// \brief LogLevel
///
/// \note Intended for internal use only. This method will likely disappear
/// in a future version.
///
/// \param logLevel
/// \return
///
Results& LogLevel(const PacBio::Logging::LogLevel logLevel);
///
/// \brief NumProcessors
///
/// \note Intended for internal use only. This method will likely disappear
/// in a future version.
///
/// \param nproc
/// \return
///
Results& NumProcessors(const uint16_t nproc);
///
/// \brief Registers observed positional arg.
///
/// Used in constructing results from command line or RTC; unlikely needed
/// by client code.
///
/// \param arg
/// \return
///
Results& RegisterPositionalArg(const std::string& arg);
///
/// \brief RegisterObservedOption
///
/// Used in constructing results from command line or RTC; unlikely needed
/// by client code.
///
/// \param optionId
/// \return
///
Results& RegisterObservedOption(const std::string& optionId);
///
/// \brief RegisterOptionValue
///
/// Used in constructing results from command line or RTC; unlikely needed
/// by client code.
///
/// \param optionId
/// \param optionValue
/// \return
///
Results& RegisterOptionValue(const std::string& optionId,
const JSON::Json& optionValue);
///
/// \brief RegisterOptionValueString
///
/// Used in constructing results from command line or RTC; unlikely needed
/// by client code.
///
/// \param optionId
/// \param optionValue
/// \return
///
Results& RegisterOptionValueString(const std::string& optionId,
const std::string& optionValue);
///
/// \brief SetFromRTC
///
/// \note Intended for internal use only. This method will likely disappear
/// in a future version.
///
/// \param ok
/// \return
///
Results& SetFromRTC(const bool ok = true);
/// \}
private:
std::unique_ptr<internal::ResultsPrivate> d_;
};
} // namespace CLI
} // namespace PacBio
#include "internal/Results-inl.h"
#endif // PBCOPPER_CLI_RESULTS_H
|