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


A function that inserts a string.

When this function is seen in markup it is replaced by a string that is set when the function is declared.

Definition at line 232 of file DocumentMarkup.h.

#include <util/Sawyer/DocumentMarkup.h>

Inheritance diagram for Sawyer::Document::Markup::StaticContent:
Inheritance graph
Collaboration diagram for Sawyer::Document::Markup::StaticContent:
Collaboration graph

Public Member Functions

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

Static Public Member Functions

static Ptr instance (const std::string &name, const std::string str)
 Create a new instance. More...

Protected Member Functions

 StaticContent (const std::string &name, const std::string &resultString)
- 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. More...

Member Function Documentation

static Ptr Sawyer::Document::Markup::StaticContent::instance ( const std::string &  name,
const std::string  str 

Create a new instance.

See class for details.

Definition at line 239 of file DocumentMarkup.h.

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

How to evaluate this function or macro.

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

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