Make some functions return const refs, and add a comment.

This commit is contained in:
Richard Heck 2014-04-06 21:53:54 -04:00
parent c0be76a2d6
commit 75aa0d61db

View File

@ -85,13 +85,18 @@ public:
FontInfo labelfont() const { return labelfont_; } FontInfo labelfont() const { return labelfont_; }
/// ///
ColorCode bgcolor() const { return bgcolor_; } ColorCode bgcolor() const { return bgcolor_; }
///
Layout::LaTeXArgMap const & latexargs() const { return latexargs_; }
/// ///
Layout::LaTeXArgMap const & postcommandargs() const { return postcommandargs_; }
/// Returns latexargs() + postcommandargs().
/// But note that it returns a *copy*, not a reference, so do not do
/// anything like:
/// Layout::LaTeXArgMap it = args().begin();
/// Layout::LaTeXArgMap en = args().end();
/// Those are iterators for different containers.
Layout::LaTeXArgMap args() const; Layout::LaTeXArgMap args() const;
/// ///
Layout::LaTeXArgMap latexargs() const { return latexargs_; }
///
Layout::LaTeXArgMap postcommandargs() const { return postcommandargs_; }
///
unsigned int optArgs() const; unsigned int optArgs() const;
/// ///
unsigned int requiredArgs() const; unsigned int requiredArgs() const;