Defined in header <cparse/Generator.hh>

virtual Indentation& getIndentor() = 0;

Returns a reference to the Indentation instance the subclass owns. Callers stream getIndentor() before content to produce correctly indented lines:

getStream() << getIndentor() << "int x = 0;\n";

Parameters

None.

Return value

A reference to the Indentation member.

Exceptions

Implementations should not throw.

Notes

Typically returned by-reference to a data member of the subclass:

class MyGen : public fedem::parser::Generator {
    fedem::parser::Indentation indent_;
public:
    Indentation& getIndentor() override { return indent_; }
    // ...
};

The stream inserter for Indentation writes getIndentation() space characters. getIndentor().right() and .left() adjust the indent by whole steps.

See also