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

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

#include <upload_data.hpp>

Inheritance diagram for molybden::FileValue:
molybden::FileBytes molybden::FilePath

Public Member Functions

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

Protected Member Functions

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

Detailed Description

The base class that all file value types must implement.

Member Function Documentation

◆ as()

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

Casts this file value to the target type.

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

if (auto file_path = file_value->As<FilePath>()) {
const std::string& path = file_path->Value();
}
The file path value.
Definition upload_data.hpp:217
Template Parameters
Sthe target type that must be the FileValue subclass.

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