Skip to content

Commit ae685f3

Browse files
committedJul 23, 2018
Add doc for QgsWfsParameter
1 parent 3e00b10 commit ae685f3

File tree

1 file changed

+48
-3
lines changed

1 file changed

+48
-3
lines changed
 

‎src/server/services/wfs/qgswfsparameters.h

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ namespace QgsWfs
3333

3434
/**
3535
* \ingroup server
36-
* \class QgsWfs::QgsWfsParameters
37-
* \brief Provides an interface to retrieve and manipulate WFS parameters received from the client.
38-
* \since QGIS 3.0
36+
* \class QgsWfs::QgsWfsParameter
37+
* \brief WFS parameter received from the client.
38+
* \since QGIS 3.4
3939
*/
4040
class QgsWfsParameter : public QgsServerParameterDefinition
4141
{
@@ -62,24 +62,69 @@ namespace QgsWfs
6262
};
6363
Q_ENUM( Name )
6464

65+
/**
66+
* Constructor for QgsWfsParameter.
67+
* \param name Name of the WMS parameter
68+
* \param type Type of the parameter
69+
* \param defaultValue Default value of the parameter
70+
*/
6571
QgsWfsParameter( const QgsWfsParameter::Name name = QgsWfsParameter::UNKNOWN,
6672
const QVariant::Type type = QVariant::String,
6773
const QVariant defaultValue = QVariant( "" ) );
6874

75+
/**
76+
* Default destructor for QgsWfsParameter.
77+
*/
6978
virtual ~QgsWfsParameter() = default;
7079

80+
/**
81+
* Converts the parameter into an integer.
82+
* \returns An integer
83+
* \throws QgsBadRequestException Invalid parameter exception
84+
*/
7185
int toInt() const;
86+
87+
/**
88+
* Converts the parameter into a list of string.
89+
* \param exp The expression to use for splitting
90+
* \returns A list of strings
91+
* \throws QgsBadRequestException Invalid parameter exception
92+
*/
7293
QStringList toStringListWithExp( const QString &exp = "\\(([^()]+)\\)" ) const;
94+
95+
/**
96+
* Converts the parameter into a rectangle.
97+
* \returns A rectangle
98+
* \throws QgsBadRequestException Invalid parameter exception
99+
*/
73100
QgsRectangle toRectangle() const;
74101

102+
/**
103+
* Raises an error in case of an invalid conversion.
104+
* \throws QgsBadRequestException Invalid parameter exception
105+
*/
75106
void raiseError() const;
76107

108+
/**
109+
* Converts a parameter's name into its string representation.
110+
*/
77111
static QString name( const QgsWfsParameter::Name );
112+
113+
/**
114+
* Converts a string into a parameter's name (UNKNOWN in case of an
115+
* invalid string).
116+
*/
78117
static QgsWfsParameter::Name name( const QString &name );
79118

80119
QgsWfsParameter::Name mName;
81120
};
82121

122+
/**
123+
* \ingroup server
124+
* \class QgsWfs::QgsWfsParameters
125+
* \brief Provides an interface to retrieve and manipulate WFS parameters received from the client.
126+
* \since QGIS 3.0
127+
*/
83128
class QgsWfsParameters : public QgsServerParameters
84129
{
85130
Q_GADGET

0 commit comments

Comments
 (0)
Please sign in to comment.