Spicy
Public Member Functions | Protected Member Functions | List of all members
hilti::Ctor Class Referenceabstract

#include <ctor.h>

Inheritance diagram for hilti::Ctor:
hilti::Node hilti::ctor::detail::IntegerBase< int64_t > hilti::ctor::detail::IntegerBase< uint64_t > hilti::ctor::Address hilti::ctor::Bitfield hilti::ctor::Bool hilti::ctor::Bytes hilti::ctor::Coerced hilti::ctor::Default hilti::ctor::Enum hilti::ctor::Error hilti::ctor::Exception hilti::ctor::Interval hilti::ctor::Library hilti::ctor::List hilti::ctor::Map hilti::ctor::Network hilti::ctor::Null hilti::ctor::Optional hilti::ctor::Port hilti::ctor::Real hilti::ctor::RegExp hilti::ctor::Result hilti::ctor::Set hilti::ctor::Stream hilti::ctor::String hilti::ctor::StrongReference hilti::ctor::Struct hilti::ctor::Time hilti::ctor::Tuple hilti::ctor::Union hilti::ctor::ValueReference hilti::ctor::Vector hilti::ctor::WeakReference hilti::ctor::detail::IntegerBase< Value > spicy::ctor::Unit

Public Member Functions

virtual QualifiedTypetype () const =0
 
virtual bool isReferenceCtor () const
 
- Public Member Functions inherited from hilti::Node
node::Tag nodeTag () const
 
bool hasParent () const
 
Nodeparent (int i=1) const
 
template<typename T >
T * parent () const
 
auto pathLength () const
 
const auto & meta () const
 
const auto & location () const
 
void setMeta (Meta m)
 
auto scope () const
 
auto getOrCreateScope ()
 
void clearScope ()
 
Result< std::pair< Declaration *, ID > > lookupID (const ID &id, const std::string_view &what) const
 
virtual bool inheritScope () const
 
std::string typename_ () const
 
uint64_t identity () const
 
const auto & children () const
 
template<typename T >
T * child (unsigned int i) const
 
template<typename T >
T * childTryAs (unsigned int i) const
 
Nodechild (unsigned int i) const
 
template<typename T >
auto children (int begin, std::optional< int > end) const
 
template<typename T >
auto children (int begin, std::optional< int > end)
 
template<typename T >
node::Set< T > childrenOfType () const
 
bool hasChild (const Node *n, bool recurse=false) const
 
Nodesibling (Node *n) const
 
void addChild (ASTContext *ctx, Node *n)
 
void addChildren (ASTContext *ctx, const Nodes &children)
 
void removeChild (Node *n)
 
void removeChildren (int begin, std::optional< int > end)
 
void setChild (ASTContext *ctx, size_t idx, Node *n)
 
void replaceChildren (ASTContext *ctx, const Nodes &children)
 
void replaceChild (ASTContext *ctx, Node *old, Node *new_)
 
template<typename T >
bool isA () const
 
template<typename T >
bool isA_ () const
 
template<typename T >
T * as () const
 
template<typename T >
T * as ()
 
template<typename T >
const T * tryAs () const
 
template<typename T >
T * tryAs ()
 
template<typename T >
T * tryAs_ ()
 
void print (std::ostream &out, bool compact, bool user_visible) const
 
std::string print () const
 
std::string printRaw () const
 
 operator std::string () const
 
std::string dump () const
 
std::string renderSelf (bool include_location=true) const
 
void addError (std::string msg, std::vector< std::string > context={})
 
void addError (std::string msg, node::ErrorPriority priority, std::vector< std::string > context={})
 
void addError (std::string msg, const Location &l, std::vector< std::string > context={})
 
void addError (std::string msg, Location l, node::ErrorPriority priority, std::vector< std::string > context={})
 
bool hasErrors () const
 
const auto & errors () const
 
void clearErrors ()
 
void clearChildren ()
 
void retain ()
 
void release ()
 
bool isRetained () const
 
virtual node::Properties properties () const
 
virtual void dispatch (visitor::Dispatcher &v)=0
 
virtual std::string_view branchTag () const
 
Nodeoperator= (const Node &other)=delete
 
Nodeoperator= (Node &&other) noexcept=delete
 

Protected Member Functions

 Ctor (ASTContext *ctx, node::Tags node_tags, Nodes children, Meta meta)
 
std::string _dump () const override
 
 HILTI_NODE_0 (Ctor, override)
 
- Protected Member Functions inherited from hilti::Node
 Node (ASTContext *ctx, node::Tags node_tags, Nodes children, Meta meta)
 
 Node (ASTContext *ctx, node::Tags node_tags, Meta meta)
 
 Node (Node &&other)=default
 
 Node (const Node &other)
 
virtual std::string _typename () const
 
virtual Node_clone (ASTContext *ctx) const =0
 

Additional Inherited Members

- Static Public Attributes inherited from hilti::Node
static constexpr uint16_t NodeLevel = 0
 
static constexpr ::hilti::node::Tag NodeTag = ::hilti::node::tag::Node
 
static constexpr ::hilti::node::Tags NodeTags = {::hilti::node::tag::Node}
 

Detailed Description

Base class for classes implementing constructor nodes.

Member Function Documentation

◆ _dump()

std::string Ctor::_dump ( ) const
overrideprotectedvirtual

Returns additional information to include into the node's dump() output, as provided by derived classes.

Reimplemented from hilti::Node.

◆ isReferenceCtor()

virtual bool hilti::Ctor::isReferenceCtor ( ) const
inlinevirtual

Returns true for constructors creating a reference to another type.

Reimplemented in hilti::ctor::ValueReference, hilti::ctor::WeakReference, and hilti::ctor::StrongReference.

◆ type()

virtual QualifiedType* hilti::Ctor::type ( ) const
pure virtual

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