class ugcs::vsm::Vehicle_request::Handle

Overview

Handle of the request passed to the SDK user. More…

#include <vehicle_request.h>

class Handle
{
public:
    // construction

    Handle();
    Handle(Vehicle_request::Ptr vehicle_request);

    // methods

    operator bool () const;

    void Fail(
        const char* format = nullptr,
        ...
        );

    void Fail_v(
        const char* format,
        va_list fmt_args
        );

    void Fail(const std::string& reason);
    void Succeed();
};

// direct descendants

class Handle;

Detailed Documentation

Handle of the request passed to the SDK user.

Used to expose only the necessary base interface for the user and hide other methods of the main request class. Passed by value, as this is effectively only a pointer wrapper.

Construction

Handle()

Construct initially invalid handle.

Handle(Vehicle_request::Ptr vehicle_request)

Construct handle instance with managed vehicle request.

Called by SDK only.

Methods

operator bool () const

Handle validness check.

Handle is considered valid if it points to some vehicle request which is not yet completed.

Returns:

true if handle is valid, otherwise false.