Wt  4.12.1
Public Member Functions | List of all members
Wt::WDataInfo Class Reference

A class that stores informations about data. More...

Inheritance diagram for Wt::WDataInfo:
[legend]

Public Member Functions

 WDataInfo ()
 Creates an empty WDataInfo.
 
 WDataInfo (const std::string &url, const std::string &filePath)
 Creates a WDataInfo. More...
 
void setFilePath (const std::string &filePath)
 Sets the file path.
 
std::string filePath () const override
 Returns a path to a file containing the data. More...
 
void setUrl (const std::string &url)
 Sets the URL.
 
std::string url () const override
 Returns the URL of the data. More...
 
void setDataUri (const std::string &dataUri)
 Sets the data formated as data URI.
 
std::string dataUri () const override
 Returns the data in data URI format. More...
 
bool hasFilePath () const override
 Returns whether this contains a file path. More...
 
bool hasUrl () const override
 Returns whether this contains a url. More...
 
virtual bool hasDataUri () const
 Returns whether this can return the data in data URI format. More...
 
- Public Member Functions inherited from Wt::WAbstractDataInfo
virtual std::string name () const
 Returns the name of the Data. More...
 

Detailed Description

A class that stores informations about data.

This is a barebone version of WAbstractDataInfo. It simply stores the information given to it.

See also
WDocRootDataInfo

Constructor & Destructor Documentation

◆ WDataInfo()

Wt::WDataInfo::WDataInfo ( const std::string &  url,
const std::string &  filePath 
)

Creates a WDataInfo.

Creates a WDataInfo with the given url and filePath.

Member Function Documentation

◆ dataUri()

std::string Wt::WDataInfo::dataUri ( ) const
overridevirtual

Returns the data in data URI format.

Throws if the data URI is set to an empty string.

See also
hasDataUri()

Reimplemented from Wt::WAbstractDataInfo.

◆ filePath()

std::string Wt::WDataInfo::filePath ( ) const
overridevirtual

Returns a path to a file containing the data.

Throws if the file path is set to an empty string.

See also
hasFilePath()

Reimplemented from Wt::WAbstractDataInfo.

◆ hasDataUri()

virtual bool Wt::WDataInfo::hasDataUri ( ) const
virtual

Returns whether this can return the data in data URI format.

This returns whether dataUri() returns a non-empty string.

See also
dataUri()

Reimplemented from Wt::WAbstractDataInfo.

◆ hasFilePath()

bool Wt::WDataInfo::hasFilePath ( ) const
overridevirtual

Returns whether this contains a file path.

This returns whether filePath() returns a non-empty string.

See also
filePath()

Reimplemented from Wt::WAbstractDataInfo.

◆ hasUrl()

bool Wt::WDataInfo::hasUrl ( ) const
overridevirtual

Returns whether this contains a url.

This returns whether url() returns a non-empty string.

See also
url()

Reimplemented from Wt::WAbstractDataInfo.

◆ url()

std::string Wt::WDataInfo::url ( ) const
overridevirtual

Returns the URL of the data.

Throws if the URL is set to an empty string.

See also
hasUrl()

Reimplemented from Wt::WAbstractDataInfo.