Class SieveArgument.

Inherits SieveProduction

The SieveArgument class models the RFC 5228 "argument" production.

Nothing prevents the user from setting both tag(), number() and stringList(), even though in theory exactly one should be set.

void SieveArgument::assertNumber()

Records an error if this argument isn't a number.

void SieveArgument::assertString()

Records an error if this argument isn't a single string.

void SieveArgument::assertStringList()

Records an error if this argument isn't a string list.

void SieveArgument::assertTag()

Records an error if this argument isn't a tag.

uint SieveArgument::number() const

Returns the object's number, or 0 if this object doesn't have a number (in which case it has a stringList(), tag() or a nonempty error()).

bool SieveArgument::parsed() const

Returns what setParsed() set, and false if setParsed() has never been called.

void SieveArgument::setNumber( uint n )

Notifies this object that has a number, and that its number is n.

void SieveArgument::setParsed( bool p )

Notifies this argument that it has been parsed if p is true, and that it hasn't if p is false. The initial value is false. This is only used by SieveTest for the moment, to keep track of which arguments have been parsed and which still need parsing.

void SieveArgument::setStringList( UStringList * s )

Notifies this object that it has a string list, and that its string list is s. If s is a null pointer, this function does nothing.

void SieveArgument::setTag( const EString & t )

Notifies this object that it has a tag, and that its tag is t. t should start with ':'.

UStringList * SieveArgument::stringList() const

Returns the object's string list, or a null pointer if this object doesn't have a string list (in which case it has a number(), tag() or a nonempty error()).

EString SieveArgument::tag() const

Returns the object's tag, which always starts with ':', or an empty string if this object doesn't have a tag.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.