C++/Tree Mapping Runtime Library
Public Member Functions | List of all members
element_type< C, T > Class Template Referenceabstract

Base class for element types. More...

#include <elements.hxx>

Public Member Functions

virtual element_type_clone (flags f=0) const =0
 Copy the instance polymorphically.
 
virtual const std::basic_string< C > & _name () const =0
 Return the element name.
 
virtual const std::basic_string< C > & _namespace () const =0
 Return the element namespace.
 
virtual T * _value ()=0
 Return the element value.
 
virtual const T * _value () const =0
 Return the element value.
 

Detailed Description

template<typename C, typename T>
class xsd::cxx::tree::element_type< C, T >

Base class for element types.

This class is a base for every generated element type.

Member Function Documentation

◆ _clone()

template<typename C , typename T >
virtual element_type * _clone ( flags  f = 0) const
pure virtual

Copy the instance polymorphically.

Parameters
fFlags to create the copy with.
Returns
A pointer to the dynamically allocated copy.

This function ensures that the dynamic type of the instance is used for copying and should be used for polymorphic object models instead of the copy constructor.

◆ _name()

template<typename C , typename T >
virtual const std::basic_string< C > & _name ( ) const
pure virtual

Return the element name.

Returns
A read-only string reference containing the element name.

◆ _namespace()

template<typename C , typename T >
virtual const std::basic_string< C > & _namespace ( ) const
pure virtual

Return the element namespace.

Returns
A read-only string reference containing the element namespace. Empty string is returned if the element is unqualified.

◆ _value() [1/2]

template<typename C , typename T >
virtual T * _value ( )
pure virtual

Return the element value.

Returns
A pointer to the element value or 0 if the element is of a fundamental type.

◆ _value() [2/2]

template<typename C , typename T >
virtual const T * _value ( ) const
pure virtual

Return the element value.

Returns
A read-only pointer to the element value or 0 if the element is of a fundamental type.

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

Copyright © 2005-2023 Code Synthesis.