ROSE 0.11.145.192
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Sawyer::Document::Markup::Error Class Reference

Description

Function that generates an error message.

This function generates an error. If given an argument, the argument is the text of the error message, otherwise it uses the default value set at declaration time.

Definition at line 249 of file DocumentMarkup.h.

#include <Sawyer/DocumentMarkup.h>

Inheritance diagram for Sawyer::Document::Markup::Error:
Inheritance graph
[legend]
Collaboration diagram for Sawyer::Document::Markup::Error:
Collaboration graph
[legend]

Public Member Functions

std::string eval (const Grammar &, const std::vector< std::string > &args)
 How to evaluate this function or macro.
 
- Public Member Functions inherited from Sawyer::Document::Markup::Function
const std::string & name () const
 Function name.
 
bool isMacro () const
 Whether declaration is for a macro.
 
Ptr arg (const std::string &name)
 Declare a required argument.
 
Ptr arg (const std::string &name, const std::string &dflt)
 Declare an optional argument.
 
Ptr ellipsis (size_t n=(size_t)(-1))
 Declare additional arguments.
 
size_t nRequiredArgs () const
 Number of required arguments.
 
size_t nOptionalArgs () const
 Number of optional arguments.
 
size_t nAdditionalArgs () const
 Max number of additional arguments.
 
size_t maxArgs () const
 Max number of actual arguments possible.
 
void validateArgs (std::vector< std::string > &actuals, TokenStream &) const
 Check and adjust actual arguments.
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor.
 
 SharedObject (const SharedObject &)
 Copy constructor.
 
virtual ~SharedObject ()
 Virtual destructor.
 
SharedObjectoperator= (const SharedObject &)
 Assignment.
 
- Public Member Functions inherited from Sawyer::SharedFromThis< Function >
SharedPointer< FunctionsharedFromThis ()
 Create a shared pointer from this.
 
SharedPointer< const FunctionsharedFromThis () const
 Create a shared pointer from this.
 

Static Public Member Functions

static Ptr instance (const std::string &name, const std::string dfltMesg="error")
 Create a new instance.
 

Protected Member Functions

 Error (const std::string &name)
 
- Protected Member Functions inherited from Sawyer::Document::Markup::Function
 Function (const std::string &name, bool evalArgs=true)
 

Additional Inherited Members

- Public Types inherited from Sawyer::Document::Markup::Function
typedef SharedPointer< FunctionPtr
 Reference-counting pointer to markup function.
 

Constructor & Destructor Documentation

◆ Error()

Sawyer::Document::Markup::Error::Error ( const std::string &  name)
inlineprotected

Definition at line 251 of file DocumentMarkup.h.

Member Function Documentation

◆ instance()

static Ptr Sawyer::Document::Markup::Error::instance ( const std::string &  name,
const std::string  dfltMesg = "error" 
)
inlinestatic

Create a new instance.

See class for details.

Definition at line 254 of file DocumentMarkup.h.

◆ eval()

std::string Sawyer::Document::Markup::Error::eval ( const Grammar ,
const std::vector< std::string > &  actuals 
)
virtual

How to evaluate this function or macro.

Implements Sawyer::Document::Markup::Function.


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