OpenCurves  0.9
PlotSampleId Struct Reference

Details how an expression is referencing a plot sample. More...

#include <plotsample.h>

Public Member Functions

 PlotSampleId (const QString &name=QString(), char quote= '\0', bool regex=false)
 Constructor. More...
 
 PlotSampleId (const QString &name, bool regex)
 Constructor for unquoted references. More...
 
 PlotSampleId (const PlotSampleId &other)
 Copy constructor. More...
 
 operator bool () const
 Bool operator: true if name is set. More...
 
bool operator! () const
 Negation operator: true if not set. More...
 
void fixQuote ()
 Ensures the quote character is set for regular expressions, defaulting to (').
 

Public Attributes

QString name
 The plot name or regular expression.
 
char quote
 The quote char parsed to define the ID.
 
bool regex
 True if name is a regular expression.
 

Detailed Description

Details how an expression is referencing a plot sample.

Used by PlotSample to manage the curve and source references The ID structure contains the referenced name, the quote character it was defined with (' or ") and whether the name represents a regular expression.

Constructor & Destructor Documentation

PlotSampleId::PlotSampleId ( const QString &  name = QString(),
char  quote = '\0',
bool  regex = false 
)
inline

Constructor.

Parameters
nameThe sample name or expression.
quoteThe quote char: generally ' or " or the null character.
regexTrue if name is a regular expression.

References fixQuote().

PlotSampleId::PlotSampleId ( const QString &  name,
bool  regex 
)
inline

Constructor for unquoted references.

Parameters
nameThe sample name or expression.
regexTrue if name is a regular expression.

References fixQuote().

PlotSampleId::PlotSampleId ( const PlotSampleId other)
inline

Copy constructor.

Parameters
otherThe object to copy.

Member Function Documentation

PlotSampleId::operator bool ( ) const
inline

Bool operator: true if name is set.

Returns
True if name is not empty.
bool PlotSampleId::operator! ( ) const
inline

Negation operator: true if not set.

Returns
True if name is empty.

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