Malloy
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
malloy::html::form_data Class Reference

#include <form_data.hpp>

Public Member Functions

std::optional< form_field_datafield_by_name (std::string_view field_name) const
 
bool has_data (std::string_view field_name) const
 
bool has_content (std::string_view field_name) const
 
std::optional< std::string > content (std::string_view field_name) const
 
std::string dump () const
 

Public Attributes

std::vector< form_field_datafields
 

Detailed Description

Type to represent the data held by an HTML form.

See also
form

Member Function Documentation

◆ content()

std::optional< std::string > form_data::content ( std::string_view  field_name) const

The the parsed data content of a specific field.

Parameters
field_nameThe name of the field.
Returns
Here is the call graph for this function:

◆ dump()

std::string form_data::dump ( ) const

Dumps the key-value pairs as a readable string.

Returns
Key-value pairs represented as a string

◆ field_by_name()

std::optional< form_field_data > form_data::field_by_name ( std::string_view  field_name) const

Get a field by name.

Parameters
field_nameThe field name.
Returns
The field (if any).

◆ has_content()

bool form_data::has_content ( std::string_view  field_name) const

Checks whether a particular field has parsed content.

Parameters
field_nameThe field name.
Returns
Whether the field has parsed content.
Here is the call graph for this function:

◆ has_data()

bool form_data::has_data ( std::string_view  field_name) const

Checks whether a field has parsed data.

Parameters
field_nameThe name of the field.
Returns
Whether the field has parsed data.
Here is the call graph for this function:

Member Data Documentation

◆ fields

std::vector<form_field_data> malloy::html::form_data::fields

The data for each field.


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