Molybden API
Loading...
Searching...
No Matches
molybden::MultipartFormDataPairValue Class Referenceabstract

The base class that all pair value types must implement. More...

#include <upload_data.hpp>

Inheritance diagram for molybden::MultipartFormDataPairValue:
molybden::MultipartFormDataPairValueFile molybden::MultipartFormDataPairValueString

Public Member Functions

template<class S >
std::shared_ptr< S > as ()
 Casts this pair value to the target type.
 

Protected Member Functions

virtual MultipartFormDataPairValueType type () const =0
 Returns the current value type.
 

Detailed Description

The base class that all pair value types must implement.

Member Function Documentation

◆ as()

template<class S >
std::shared_ptr< S > molybden::MultipartFormDataPairValue::as ( )

Casts this pair value to the target type.

Returns an empty std::shared_ptr if this pair value type is not of the given target type. For example:

if (auto pair_string = pair_value->As<MultipartFormDataPairValueString>()) {
const std::string& string = pair_string->Value();
}
The multi-part form data pair string value.
Definition upload_data.hpp:290
Template Parameters
Sthe target type that must be the MultipartFormDataPairValue subclass.

The documentation for this class was generated from the following file: