# Resource.hpp
This File On Github
Ask A Question
API: latest
module: oatpp
#include "oatpp/core/data/resource/Resource.hpp"
# Resource
Abstract data resource
namespace oatpp { namespace data { namespace resource {
class Resource : public oatpp::base::Countable {}
}}}
# Methods
Return Type | Name | Summary |
---|---|---|
[none] | ~Resource | virtual destructor. |
std::shared_ptr<data::stream::OutputStream> | openOutputStream | Open output stream. |
std::shared_ptr<data::stream::InputStream> | openInputStream | Open input stream. |
oatpp::String | getInMemoryData | Get in-memory data if applicable. |
v_int64 | getKnownSize | Get known data size if applicable. |
oatpp::String | getLocation | Get resource location if applicable. |
# Resource::~Resource
virtual destructor.
virtual ~Resource() = default
# Resource::openOutputStream
Open output stream.
- @return
virtual std::shared_ptr<data::stream::OutputStream> openOutputStream() = 0
# Resource::openInputStream
Open input stream.
- @return
virtual std::shared_ptr<data::stream::InputStream> openInputStream() = 0
# Resource::getInMemoryData
Get in-memory data if applicable.
- @return -
[oatpp::String](/api/latest/oatpp/core/Types/#string)
ornullptr
if not applicable.
virtual oatpp::String getInMemoryData() = 0
# Resource::getKnownSize
Get known data size if applicable.
- @return - known size of the data.
-1
- if size is unknown.
virtual v_int64 getKnownSize() = 0
# Resource::getLocation
Get resource location if applicable.
location can be for example a file name.
- @return -
[oatpp::String](/api/latest/oatpp/core/Types/#string)
ornullptr
if not applicable.
virtual oatpp::String getLocation() = 0