Loading...
Searching...
No Matches
stdex::html::element_traits Struct Reference

Describes attributes associated with a HTML element. More...

`#include <stdex/html.hpp>`

## Static Public Member Functions

static element_span_t | span (element_t code)
| Returns expected element span in HTML code.
static bool | is_fontstyle (element_t code)
| Does element represent font styling?
static bool | is_phrase (element_t code)
| Does element represent a phrase-of-speech?
static bool | is_special (element_t code)
| Does element represent non-textual item in the document?
static bool | is_formctrl (element_t code)
| Does element represent a form control?
static bool | is_inline (element_t code)
| Is element typically displayed inline with text?
static bool | is_heading (element_t code)
| Does element represent a heading?
static bool | is_list (element_t code)
| Does element represent a list of items?
static bool | is_preformatted (element_t code)
| Does element represent preformatted text, source code etc.?
static bool | is_block (element_t code)
| Is element typically displayed as a stand-alone section of text?
static bool | is_flow (element_t code)
| Does element typically represent text?
static bool | is_head_content (element_t code)
| Is element part of the document head?
static bool | is_head_misc (element_t code)
| May element be a part of document head?
static bool | is_pre_exclusion (element_t code)
| May element be a part of.
static bool | is_html_content (element_t code)
| Does element represent the document body?
static bool | is_group (element_t code)
| Does element represent a separate part of text?
static bool | may_contain (element_t parent, element_t child)
| Checks if one element may nest inside another.
template<class T >
static bool | is_uri (element_t code, _In_reads_or_z_opt_(num_chars) const T *attr_name, size_t num_chars)
| Checks if expected element attribute value is URI.
template<class T >
static bool | is_localizable (element_t code, const T *attr_name, size_t num_chars)
| Checks if expected element attribute value is localizable.

## Detailed Description

Describes attributes associated with a HTML element.

## Member Function Documentation

## is_block()

static bool stdex::html::element_traits::is_block | ( | element_t | code | ) |

inlinestatic

Is element typically displayed as a stand-alone section of text?

Parameters

  [in] | code | Element code

## is_flow()

static bool stdex::html::element_traits::is_flow | ( | element_t | code | ) |

inlinestatic

Does element typically represent text?

Parameters

  [in] | code | Element code

## is_fontstyle()

static bool stdex::html::element_traits::is_fontstyle | ( | element_t | code | ) |

inlinestatic

Does element represent font styling?

Parameters

  [in] | code | Element code

## is_formctrl()

static bool stdex::html::element_traits::is_formctrl | ( | element_t | code | ) |

inlinestatic

Does element represent a form control?

Parameters

  [in] | code | Element code

## is_group()

static bool stdex::html::element_traits::is_group | ( | element_t | code | ) |

inlinestatic

Does element represent a separate part of text?

Parameters

  [in] | code | Element code

## is_head_content()

static bool stdex::html::element_traits::is_head_content | ( | element_t | code | ) |

inlinestatic

Is element part of the document head?

Parameters

  [in] | code | Element code

## is_head_misc()

static bool stdex::html::element_traits::is_head_misc | ( | element_t | code | ) |

inlinestatic

May element be a part of document head?

Parameters

  [in] | code | Element code

## is_heading()

static bool stdex::html::element_traits::is_heading | ( | element_t | code | ) |

inlinestatic

Does element represent a heading?

Parameters

  [in] | code | Element code

## is_html_content()

static bool stdex::html::element_traits::is_html_content | ( | element_t | code | ) |

inlinestatic

Does element represent the document body?

Parameters

  [in] | code | Element code

## is_inline()

static bool stdex::html::element_traits::is_inline | ( | element_t | code | ) |

inlinestatic

Is element typically displayed inline with text?

Parameters

  [in] | code | Element code

## is_list()

static bool stdex::html::element_traits::is_list | ( | element_t | code | ) |

inlinestatic

Does element represent a list of items?

Parameters

  [in] | code | Element code

## is_localizable()

template<class T >

static bool stdex::html::element_traits::is_localizable | ( | element_t | code,
|  | const T * | attr_name,
|  | size_t | num_chars
| ) |  |

inlinestatic

Checks if expected element attribute value is localizable.

Parameters

  [in] | code | Element code
  [in] | attr_name | Attribute name
  [in] | num_chars | Code unit limit in `attr_name`

## is_phrase()

static bool stdex::html::element_traits::is_phrase | ( | element_t | code | ) |

inlinestatic

Does element represent a phrase-of-speech?

Parameters

  [in] | code | Element code

## is_pre_exclusion()

static bool stdex::html::element_traits::is_pre_exclusion | ( | element_t | code | ) |

inlinestatic

May element be a part of.

    ?

    Parameters

        [in]code Element code

## is_preformatted()

static bool stdex::html::element_traits::is_preformatted | ( | element_t | code | ) |

inlinestatic

Does element represent preformatted text, source code etc.?

Parameters

  [in] | code | Element code

## is_special()

static bool stdex::html::element_traits::is_special | ( | element_t | code | ) |

inlinestatic

Does element represent non-textual item in the document?

Parameters

  [in] | code | Element code

## is_uri()

template<class T >

static bool stdex::html::element_traits::is_uri | ( | element_t | code,
|  | _In_reads_or_z_opt_(num_chars) const T * | attr_name,
|  | size_t | num_chars
| ) |  |

inlinestatic

Checks if expected element attribute value is URI.

Parameters

  [in] | code | Element code
  [in] | attr_name | Attribute name
  [in] | num_chars | Code unit limit in `attr_name`

## may_contain()

static bool stdex::html::element_traits::may_contain | ( | element_t | parent,
|  | element_t | child
| ) |  |

inlinestatic

Checks if one element may nest inside another.

Parameters

  [in] | parent | Parent element code
  [in] | child | Child element code

Returns
  `true` if `child` may nest in `parent`; `false` otherwise

## span()

static element_span_t stdex::html::element_traits::span | ( | element_t | code | ) |

inlinestatic

Returns expected element span in HTML code.

Parameters

  [in] | code | Element code

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

- include/stdex/html.hpp