The Psyche Project
Public Types | Public Member Functions | List of all members
psy::TextElement Class Reference

The TextElement class. More...

#include <TextElement.h>

Inheritance diagram for psy::TextElement:
psy::C::SyntaxLexeme psy::C::Constant psy::C::Identifier psy::C::StringLiteral psy::C::CharacterConstant psy::C::FloatingConstant psy::C::ImaginaryFloatingConstant psy::C::ImaginaryIntegerConstant psy::C::IntegerConstant

Public Types

typedef const char * iterator
 
typedef iterator const_iterator
 

Public Member Functions

 TextElement (const char *c_str, unsigned int size)
 
 TextElement (const TextElement &other)=delete
 
void operator= (const TextElement &other)=delete
 
iterator begin () const
 
iterator end () const
 
char at (unsigned int idx) const
 
const char * c_str () const
 
unsigned int size () const
 
unsigned int length () const
 

Detailed Description

The TextElement class.

A read-only element of text, stored in dedicated memory, and chained together with other elements within a hash table.

See also
TextElementTable

Member Function Documentation

◆ at()

char psy::TextElement::at ( unsigned int  idx) const
inline

The character at the given index idx.

◆ c_str()

const char* psy::TextElement::c_str ( ) const
inline

A null-terminated C-style string of the text.

◆ length()

unsigned int psy::TextElement::length ( ) const
inline

The number of characters in the text.

◆ size()

unsigned int psy::TextElement::size ( ) const
inline

The number of characters in the text.


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