nixd
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
nixf::AttrName Class Reference

#include <Attrs.h>

Inheritance diagram for nixf::AttrName:
[legend]
Collaboration diagram for nixf::AttrName:
[legend]

Public Types

enum  AttrNameKind { ANK_ID , ANK_String , ANK_Interpolation }
 
- Public Types inherited from nixf::Node
enum  NodeKind { NK_BeginExpr , NK_EndExpr }
 
using ChildVector = boost::container::small_vector<Node *, 8>
 

Public Member Functions

AttrNameKind kind () const
 
 AttrName (std::shared_ptr< Identifier > ID, LexerCursorRange Range)
 
 AttrName (std::shared_ptr< ExprString > String)
 
 AttrName (std::shared_ptr< Interpolation > Interp)
 
bool isStatic () const
 
const std::string & staticName () const
 
const Interpolationinterpolation () const
 
const std::shared_ptr< Identifier > & id () const
 
const ExprStringstring () const
 
ChildVector children () const override
 
- Public Member Functions inherited from nixf::Node
NodeKind kind () const
 
LexerCursorRange range () const
 
PositionRange positionRange () const
 
LexerCursor lCur () const
 
LexerCursor rCur () const
 
const char * name () const
 
virtual ~Node ()=default
 
const Nodedescend (PositionRange Range) const
 Descendant node that contains the given range.
 
std::string_view src (std::string_view Src) const
 

Additional Inherited Members

- Static Public Member Functions inherited from nixf::Node
static const char * name (NodeKind Kind)
 
- Protected Member Functions inherited from nixf::Node
 Node (NodeKind Kind, LexerCursorRange Range)
 

Detailed Description

Definition at line 10 of file Attrs.h.

Member Enumeration Documentation

◆ AttrNameKind

Enumerator
ANK_ID 
ANK_String 
ANK_Interpolation 

Definition at line 12 of file Attrs.h.

Constructor & Destructor Documentation

◆ AttrName() [1/3]

nixf::AttrName::AttrName ( std::shared_ptr< Identifier > ID,
LexerCursorRange Range )
inline

Definition at line 23 of file Attrs.h.

◆ AttrName() [2/3]

nixf::AttrName::AttrName ( std::shared_ptr< ExprString > String)
inline

Definition at line 28 of file Attrs.h.

◆ AttrName() [3/3]

nixf::AttrName::AttrName ( std::shared_ptr< Interpolation > Interp)
inline

Definition at line 34 of file Attrs.h.

Member Function Documentation

◆ children()

ChildVector nixf::AttrName::children ( ) const
inlineoverridevirtual

Implements nixf::Node.

Definition at line 75 of file Attrs.h.

References ANK_ID, ANK_Interpolation, and ANK_String.

◆ id()

const std::shared_ptr< Identifier > & nixf::AttrName::id ( ) const
inline

Definition at line 64 of file Attrs.h.

References ANK_ID.

Referenced by staticName().

◆ interpolation()

const Interpolation & nixf::AttrName::interpolation ( ) const
inline

Definition at line 58 of file Attrs.h.

References ANK_Interpolation.

◆ isStatic()

bool nixf::AttrName::isStatic ( ) const
inline

Definition at line 40 of file Attrs.h.

References ANK_ID, ANK_Interpolation, ANK_String, nixf::ExprString::isLiteral(), and string().

Referenced by staticName().

◆ kind()

AttrNameKind nixf::AttrName::kind ( ) const
inline

Definition at line 21 of file Attrs.h.

◆ staticName()

const std::string & nixf::AttrName::staticName ( ) const
inline

Definition at line 50 of file Attrs.h.

References ANK_ID, ANK_String, id(), isStatic(), nixf::ExprString::literal(), and string().

◆ string()

const ExprString & nixf::AttrName::string ( ) const
inline

Definition at line 69 of file Attrs.h.

References ANK_String.

Referenced by isStatic(), and staticName().


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