Tkrzw
|
Wrapper of std::future containing a status object and extra data. More...
#include <tkrzw_dbm_async.h>
Public Member Functions | |
StatusFuture (std::future< Status > &&future) | |
Constructor for a status object. More... | |
StatusFuture (std::future< std::pair< Status, std::string >> &&future) | |
Constructor for a status object and a string. More... | |
StatusFuture (std::future< std::pair< Status, std::pair< std::string, std::string >>> &&future) | |
Constructor for a status object and a string pair. More... | |
StatusFuture (std::future< std::pair< Status, std::vector< std::string >>> &&future) | |
Constructor for a status object and a string vector. More... | |
StatusFuture (std::future< std::pair< Status, std::map< std::string, std::string >>> &&future) | |
Constructor for a status object and a string map. More... | |
StatusFuture (std::future< std::pair< Status, int64_t >> &&future) | |
Constructor for a status object and an integer. More... | |
StatusFuture (StatusFuture &&rhs) | |
Move constructor. More... | |
~StatusFuture () | |
Destructor. More... | |
StatusFuture (const StatusFuture &rhs)=delete | |
Copy and assignment are disabled. More... | |
StatusFuture & | operator= (const StatusFuture &rhs)=delete |
bool | Wait (double timeout=-1) |
Waits for the operation to be done. More... | |
Status | Get () |
Waits for the operation to be done and gets the result status. More... | |
std::pair< Status, std::string > | GetString () |
Waits for the operation to be done and gets the status and the extra string. More... | |
std::pair< Status, std::pair< std::string, std::string > > | GetStringPair () |
Waits for the operation to be done and gets the status and the extra string pair. More... | |
std::pair< Status, std::vector< std::string > > | GetStringVector () |
Waits for the operation to be done and gets the status and the extra string vector. More... | |
std::pair< Status, std::map< std::string, std::string > > | GetStringMap () |
Waits for the operation to be done and gets the status and the extra string map. More... | |
std::pair< Status, int64_t > | GetInteger () |
Waits for the operation to be done and gets the status and the extra integer. More... | |
const std::type_info & | GetExtraType () |
Gets the type information of the extra data. More... | |
Wrapper of std::future containing a status object and extra data.
|
explicit |
Constructor for a status object.
future | a future object. The ownership is taken. |
|
explicit |
Constructor for a status object and a string.
future | a future object. The ownership is taken. |
|
explicit |
Constructor for a status object and a string pair.
future | a future object. The ownership is taken. |
|
explicit |
Constructor for a status object and a string vector.
future | a future object. The ownership is taken. |
|
explicit |
Constructor for a status object and a string map.
future | a future object. The ownership is taken. |
|
explicit |
Constructor for a status object and an integer.
future | a future object. The ownership is taken. |
tkrzw::StatusFuture::StatusFuture | ( | StatusFuture && | rhs | ) |
Move constructor.
rhs | The right-hand-side object. |
tkrzw::StatusFuture::~StatusFuture | ( | ) |
Destructor.
|
explicitdelete |
Copy and assignment are disabled.
bool tkrzw::StatusFuture::Wait | ( | double | timeout = -1 | ) |
Waits for the operation to be done.
timeout | The waiting time in seconds. If it is negative, no timeout is set. |
Status tkrzw::StatusFuture::Get | ( | ) |
Waits for the operation to be done and gets the result status.
Either one of the Get method family can be called only once.
std::pair<Status, std::string> tkrzw::StatusFuture::GetString | ( | ) |
Waits for the operation to be done and gets the status and the extra string.
Either one of the Get method family can be called only once.
std::pair<Status, std::pair<std::string, std::string> > tkrzw::StatusFuture::GetStringPair | ( | ) |
Waits for the operation to be done and gets the status and the extra string pair.
Either one of the Get method family can be called only once.
std::pair<Status, std::vector<std::string> > tkrzw::StatusFuture::GetStringVector | ( | ) |
Waits for the operation to be done and gets the status and the extra string vector.
Either one of the Get method family can be called only once.
std::pair<Status, std::map<std::string, std::string> > tkrzw::StatusFuture::GetStringMap | ( | ) |
Waits for the operation to be done and gets the status and the extra string map.
Either one of the Get method family can be called only once.
std::pair<Status, int64_t> tkrzw::StatusFuture::GetInteger | ( | ) |
Waits for the operation to be done and gets the status and the extra integer.
Either one of the Get method family can be called only once.
const std::type_info& tkrzw::StatusFuture::GetExtraType | ( | ) |
Gets the type information of the extra data.