ROSE 0.11.145.192
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Rosebud::YamlGenerator Class Reference

Description

Generator that produces a YAML description of the input.

Definition at line 10 of file YamlGenerator.h.

#include <Rosebud/YamlGenerator.h>

Inheritance diagram for Rosebud::YamlGenerator:
Inheritance graph
[legend]
Collaboration diagram for Rosebud::YamlGenerator:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< YamlGenerator >
 
- Public Types inherited from Rosebud::Generator
using Ptr = GeneratorPtr
 

Public Member Functions

virtual std::string name () const override
 Property: Every generator should have a unique name.
 
virtual std::string purpose () const override
 Property: Single-line description for documentation.
 
virtual void adjustParser (Sawyer::CommandLine::Parser &) override
 Add command-line switches and documentation to a parser.
 
virtual void generate (const Ast::ProjectPtr &) override
 Generate code.
 
- Public Member Functions inherited from Rosebud::Generator
virtual std::string propertyDataMemberName (const Ast::PropertyPtr &) const
 Data member name for a property.
 
virtual std::vector< std::string > propertyAccessorNames (const Ast::PropertyPtr &) const
 Accessor names for a property.
 
virtual std::vector< std::string > propertyMutatorNames (const Ast::PropertyPtr &) const
 Mutator names for a property.
 
void commandLine (const std::vector< std::string > &)
 Property: Entire Rosebud command line.
 
const std::vector< std::string > & commandLine () const
 Property: Entire Rosebud command line.
 

Static Public Member Functions

static Ptr instance ()
 
- Static Public Member Functions inherited from Rosebud::Generator
static void registerGenerator (const Ptr &)
 Register a backend for use later.
 
static const std::vector< Ptr > & registeredGenerators ()
 Return all registered backends.
 
static Ptr lookup (const std::string &)
 Return the registered generator with the specified name.
 
static void addAllToParser (Sawyer::CommandLine::Parser &)
 Add all known generator switches to parser.
 

Additional Inherited Members

- Protected Member Functions inherited from Rosebud::Generator
std::string generatedByRosebud (const std::string &prefix)
 Return a multi-line comment that this file was generated by Rosebud.
 

Member Typedef Documentation

◆ Ptr

using Rosebud::YamlGenerator::Ptr = std::shared_ptr<YamlGenerator>

Definition at line 12 of file YamlGenerator.h.

Constructor & Destructor Documentation

◆ YamlGenerator()

Rosebud::YamlGenerator::YamlGenerator ( )
inlineprotected

Definition at line 18 of file YamlGenerator.h.

Member Function Documentation

◆ name()

virtual std::string Rosebud::YamlGenerator::name ( ) const
overridevirtual

Property: Every generator should have a unique name.

Implements Rosebud::Generator.

◆ purpose()

virtual std::string Rosebud::YamlGenerator::purpose ( ) const
overridevirtual

Property: Single-line description for documentation.

Implements Rosebud::Generator.

◆ adjustParser()

virtual void Rosebud::YamlGenerator::adjustParser ( Sawyer::CommandLine::Parser )
overridevirtual

Add command-line switches and documentation to a parser.

Any command-line switches and documentation that is specific to the backend are added to the specified parser. In order to not conflict with other backends that might also be adding switch parsers, the backend should create a switch group and give it a unique prefix.

Reimplemented from Rosebud::Generator.

◆ generate()

virtual void Rosebud::YamlGenerator::generate ( const Ast::ProjectPtr )
overridevirtual

Generate code.

The specified project AST is used to generate code.

Implements Rosebud::Generator.


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