NovaSVG 0.11.5
An SVG library
Loading...
Searching...
No Matches
nova::svg::text_node Class Reference

#include <svg.h>

Inheritance diagram for nova::svg::text_node:
Collaboration diagram for nova::svg::text_node:

Public Member Functions

 text_node ()=default
 Constructs a null text nd.
const std::string & data () const
 Returns the text content of the nd.
void set_data (const std::string &data)
 Sets the text content of the nd.
Public Member Functions inherited from nova::svg::node
 node ()=default
 Constructs a null nd.
bool is_text_node () const
 Checks if the nd is a text nd.
bool is_element () const
 Checks if the nd is an el nd.
text_node to_text_node () const
 Converts the nd to a text_node.
element to_element () const
 Converts the nd to an element.
element parent_element () const
 Returns the parent el.
bool is_null () const
 Checks if the nd is null.
 operator bool () const
 Checks if the nd is not null.
bool operator== (const node &nd) const
 Checks if two nodes are equal.
bool operator!= (const node &nd) const
 Checks if two nodes are not equal.

Friends

class node

Additional Inherited Members

Protected Member Functions inherited from nova::svg::node
 node (svg_node *nd)
svg_node * nd () const
Protected Attributes inherited from nova::svg::node
svg_node * m_node {nullptr}

Detailed Description

Definition at line 167 of file svg.h.

Constructor & Destructor Documentation

◆ text_node()

nova::svg::text_node::text_node ( )
default

Constructs a null text nd.

Referenced by set_data().

Member Function Documentation

◆ data()

const std::string & nova::svg::text_node::data ( ) const

Returns the text content of the nd.

Returns
A string representing the text content.

Referenced by set_data().

◆ set_data()

void nova::svg::text_node::set_data ( const std::string & data)

Sets the text content of the nd.

Parameters
dataThe new text content to set.

References data(), and text_node().

◆ node

friend class node
friend

Definition at line 189 of file svg.h.

References node.

Referenced by node.


The documentation for this class was generated from the following file:
  • /home/runner/work/novasvg/novasvg/include/nova/svg/svg.h