Class OpFragment

Inheritance Relationships

Base Type

Class Documentation

class URI::Template::OpFragment : public URI::Template::Operator

Fragment expansion operator.

Fragment expansion, as indicated by the crosshatch (“#”) operator for Level 2 and above templates, is identical to reserved expansion except that a crosshatch character (fragment delimiter) is appended first to the result string if any of the variables are defined.

Public Functions

OpFragment() = default

Constructor.

virtual ~OpFragment() = default

Destructor.

virtual OperatorType Type() const override

Get type of the operator.

Returns

OperatorType::FRAGMENT.

virtual char Start() const override

Get starting character of the operator.

Returns

‘#’.

virtual char First() const override

Get the first character used for operator expansion.

Returns

‘#’.

virtual char Separator() const override

Get the separator character used for operator expansion.

Returns

‘,’.

virtual bool Named() const override

Check if the operator using named variables or not.

Returns

false.

virtual bool EmptyEq() const override

Check if the operator using ‘=’ sign for empty variables.

Returns

false.

virtual bool Reserved() const override

Check if the operator allows reserved characters for variable value.

Returns

true.

virtual bool StartExpanded() const override

Check if the operator’s start character also used in expansion.

Returns

true.