/usr/include/arc/compute/EndpointQueryingStatus.h is in nordugrid-arc-dev 5.0.5-1ubuntu1.
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 | #ifndef __ARC_ENDPOINTQUERYINGSTATUS_H__
#define __ARC_ENDPOINTQUERYINGSTATUS_H__
#include <string>
namespace Arc {
/// Represents the status in the EntityRetriever of the query process of an Endpoint (service registry, computing element).
/**
* An object of this class is returned by the instances of the EntityRetriever
* (e.g. #ServiceEndpointRetriever, #TargetInformationRetriever,
* #JobListRetriever) representing the state of the process of querying an
* Endpoint. It contains an #EndpointQueryingStatusType enum (#getStatus), and
* a description string (#getDescription)
*
* \ingroup compute
* \headerfile EndpointQueryingStatus.h arc/compute/EndpointQueryingStatus.h
*/
class EndpointQueryingStatus {
public:
/** The possible states: */
enum EndpointQueryingStatusType {
UNKNOWN, /**< the state is unknown */
SUSPENDED_NOTREQUIRED, /**< Querying of the endpoint is suspended since querying it is not required. */
STARTED, /**< the query process was started */
FAILED, /**< the query process failed */
NOPLUGIN, /**< there is no plugin for the given Endpoint InterfaceName (so the query process was not even started) */
NOINFORETURNED, /**< query was successful but the response didn't contain entity information */
SUCCESSFUL /**< the query process was successful */
};
/** String representation of the states in the enum #EndpointQueryingStatusType */
static std::string str(EndpointQueryingStatusType status);
/** A new EndpointQueryingStatus is created with #UNKNOWN status and with an empty description by default */
EndpointQueryingStatus(EndpointQueryingStatusType status = UNKNOWN, const std::string& description = "") : status(status), description(description) {};
/** This EndpointQueryingStatus object equals to an enum #EndpointQueryingStatusType if it contains the same state */
bool operator==(EndpointQueryingStatusType s) const { return status == s; };
/** This EndpointQueryingStatus object equals to another EndpointQueryingStatus object, if their state equals.
The description doesn't matter.
*/
bool operator==(const EndpointQueryingStatus& s) const { return status == s.status; };
/** Inequality. \see operator==(EndpointQueryingStatusType) */
bool operator!=(EndpointQueryingStatusType s) const { return status != s; };
/** Inequality. \see operator==(const EndpointQueryingStatus&) */
bool operator!=(const EndpointQueryingStatus& s) const { return status != s.status; };
/** \return true if the status is not successful */
bool operator!() const { return status != SUCCESSFUL; };
/** \return true if the status is successful */
operator bool() const { return status == SUCCESSFUL; };
/** Setting the EndpointQueryingStatus object's state
\param[in] s the new enum #EndpointQueryingStatusType status
*/
EndpointQueryingStatus& operator=(EndpointQueryingStatusType s) { status = s; return *this; };
/** Copying the EndpointQueryingStatus object into this one.
\param[in] s the EndpointQueryingStatus object whose status and description will be copied into this object
*/
EndpointQueryingStatus& operator=(const EndpointQueryingStatus& s) { status = s.status; description = s.description; return *this; };
/** Return the enum #EndpointQueryingStatusType contained within this EndpointQueryingStatus object */
EndpointQueryingStatusType getStatus() const { return status; };
/** Return the description string contained within this EndpointQueryingStatus object */
const std::string& getDescription() const { return description; };
/** String representation of the EndpointQueryingStatus object,
which is currently simply the string representation of the enum #EndpointQueryingStatusType
*/
std::string str() const { return str(status); };
friend bool operator==(EndpointQueryingStatusType, const EndpointQueryingStatus&);
private:
EndpointQueryingStatusType status;
std::string description;
};
inline bool operator==(EndpointQueryingStatus::EndpointQueryingStatusType eqst, const EndpointQueryingStatus& eqs) { return eqs == eqst; }
} // namespace Arc
#endif // __ARC_ENDPOINTQUERYINGSTATUS_H__
|