Skip to content

Commit ca05b8b

Browse files
author
jef
committed
mapserver indentation update
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14112 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5cd4c15 commit ca05b8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+5785
-5767
lines changed

src/mapserver/qgis_map_serv.cpp

Lines changed: 249 additions & 249 deletions
Large diffs are not rendered by default.

src/mapserver/qgsbetweenfilter.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
qgsbetweenfilter.cpp
2+
qgsbetweenfilter.cpp
33
--------------------
44
begin : Feb 07, 2008
55
copyright : (C) 2008 by Marco Hugentobler
@@ -17,35 +17,35 @@
1717

1818
#include "qgsbetweenfilter.h"
1919

20-
QgsBetweenFilter::QgsBetweenFilter(): QgsFilter(-1)
20+
QgsBetweenFilter::QgsBetweenFilter(): QgsFilter( -1 )
2121
{
2222
}
23-
24-
QgsBetweenFilter::QgsBetweenFilter(int attributeIndex, const QString& lowerValue, const QString& upperValue): QgsFilter(attributeIndex), mLowerValue(lowerValue), mUpperValue(upperValue)
23+
24+
QgsBetweenFilter::QgsBetweenFilter( int attributeIndex, const QString& lowerValue, const QString& upperValue ): QgsFilter( attributeIndex ), mLowerValue( lowerValue ), mUpperValue( upperValue )
2525
{
2626
}
27-
27+
2828
QgsBetweenFilter::~QgsBetweenFilter()
2929
{
3030
}
3131

32-
bool QgsBetweenFilter::evaluate(const QgsFeature& f) const
32+
bool QgsBetweenFilter::evaluate( const QgsFeature& f ) const
3333
{
34-
QVariant propertyValue = propertyIndexValue(f);
35-
34+
QVariant propertyValue = propertyIndexValue( f );
35+
3636
//numeric or alphanumeric?
3737
bool numeric = true;
38-
if (propertyValue.type() == QVariant::String)
39-
{
40-
numeric = false;
41-
}
42-
43-
if(numeric)
44-
{
45-
return (propertyValue.toDouble() >= mLowerValue.toDouble() && propertyValue.toDouble() <= mUpperValue.toDouble());
46-
}
38+
if ( propertyValue.type() == QVariant::String )
39+
{
40+
numeric = false;
41+
}
42+
43+
if ( numeric )
44+
{
45+
return ( propertyValue.toDouble() >= mLowerValue.toDouble() && propertyValue.toDouble() <= mUpperValue.toDouble() );
46+
}
4747
else
48-
{
49-
return (propertyValue.toString() >= mLowerValue && propertyValue.toString() <= mUpperValue);
50-
}
48+
{
49+
return ( propertyValue.toString() >= mLowerValue && propertyValue.toString() <= mUpperValue );
50+
}
5151
}

src/mapserver/qgsbetweenfilter.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
qgsbetweenfilter.h
2+
qgsbetweenfilter.h
33
-------------------
44
begin : Feb 07, 2008
55
copyright : (C) 2008 by Marco Hugentobler
@@ -36,24 +36,24 @@ Sample xml fragment:
3636
*/
3737
class QgsBetweenFilter: public QgsFilter
3838
{
39-
public:
40-
QgsBetweenFilter();
41-
QgsBetweenFilter(int attributeIndex, const QString& lowerValue, const QString& upperValue);
42-
~QgsBetweenFilter();
43-
44-
/**Evaluates a feature against the filter.
45-
@return true if the filter applies for the feature*/
46-
bool evaluate(const QgsFeature& f) const;
47-
QString lowerValue() const {return mLowerValue;}
48-
QString upperValue() const {return mUpperValue;}
49-
void setLowerValue(const QString& lv){mLowerValue = lv;}
50-
void setUpperValue(const QString& uv){mUpperValue = uv;}
39+
public:
40+
QgsBetweenFilter();
41+
QgsBetweenFilter( int attributeIndex, const QString& lowerValue, const QString& upperValue );
42+
~QgsBetweenFilter();
5143

52-
private:
53-
/**Lower boundary*/
54-
QString mLowerValue;
55-
/**Upper boundary*/
56-
QString mUpperValue;
44+
/**Evaluates a feature against the filter.
45+
@return true if the filter applies for the feature*/
46+
bool evaluate( const QgsFeature& f ) const;
47+
QString lowerValue() const {return mLowerValue;}
48+
QString upperValue() const {return mUpperValue;}
49+
void setLowerValue( const QString& lv ) {mLowerValue = lv;}
50+
void setUpperValue( const QString& uv ) {mUpperValue = uv;}
51+
52+
private:
53+
/**Lower boundary*/
54+
QString mLowerValue;
55+
/**Upper boundary*/
56+
QString mUpperValue;
5757
};
5858

5959
#endif //QGSBETWEENFILTER_H

src/mapserver/qgscomparisonfilter.cpp

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
qgscomparisonfilter.cpp
2+
qgscomparisonfilter.cpp
33
-----------------------
44
begin : Jan 31, 2008
55
copyright : (C) 2008 by Marco Hugentobler
@@ -17,98 +17,98 @@
1717

1818
#include "qgscomparisonfilter.h"
1919

20-
QgsComparisonFilter::QgsComparisonFilter(): QgsFilter(), mComparisonType(QgsComparisonFilter::UNKNOWN)
20+
QgsComparisonFilter::QgsComparisonFilter(): QgsFilter(), mComparisonType( QgsComparisonFilter::UNKNOWN )
2121
{
2222
}
23-
24-
QgsComparisonFilter::QgsComparisonFilter(int propertyIndex, COMPARISON_TYPE ct, QString value): QgsFilter(propertyIndex), mComparisonType(ct), mComparisonValue(value)
23+
24+
QgsComparisonFilter::QgsComparisonFilter( int propertyIndex, COMPARISON_TYPE ct, QString value ): QgsFilter( propertyIndex ), mComparisonType( ct ), mComparisonValue( value )
2525
{
2626
}
27-
27+
2828
QgsComparisonFilter::~QgsComparisonFilter()
2929
{
3030
}
3131

32-
bool QgsComparisonFilter::evaluate(const QgsFeature& f) const
32+
bool QgsComparisonFilter::evaluate( const QgsFeature& f ) const
3333
{
34-
QVariant propertyValue = propertyIndexValue(f);
35-
36-
if(!propertyValue.isValid())
37-
{
38-
return false;
39-
}
34+
QVariant propertyValue = propertyIndexValue( f );
35+
36+
if ( !propertyValue.isValid() )
37+
{
38+
return false;
39+
}
4040

4141
bool numeric = true;
42-
if (propertyValue.type() == QVariant::String)
43-
{
44-
numeric = false;
45-
}
42+
if ( propertyValue.type() == QVariant::String )
43+
{
44+
numeric = false;
45+
}
4646

47-
switch(mComparisonType)
48-
{
47+
switch ( mComparisonType )
48+
{
4949
case EQUAL:
50-
if(numeric)
51-
{
52-
return (propertyValue.toDouble() == mComparisonValue.toDouble());
53-
}
50+
if ( numeric )
51+
{
52+
return ( propertyValue.toDouble() == mComparisonValue.toDouble() );
53+
}
5454
else
55-
{
56-
return (propertyValue.toString() == mComparisonValue);
57-
}
55+
{
56+
return ( propertyValue.toString() == mComparisonValue );
57+
}
5858
break;
5959
case NOT_EQUAL:
60-
if(numeric)
61-
{
62-
return (propertyValue.toDouble() != mComparisonValue.toDouble());
63-
}
60+
if ( numeric )
61+
{
62+
return ( propertyValue.toDouble() != mComparisonValue.toDouble() );
63+
}
6464
else
65-
{
66-
return (propertyValue.toString() != mComparisonValue);
67-
}
65+
{
66+
return ( propertyValue.toString() != mComparisonValue );
67+
}
6868
break;
6969
case LESSER:
70-
if(numeric)
71-
{
72-
return (propertyValue.toDouble() < mComparisonValue.toDouble());
73-
}
70+
if ( numeric )
71+
{
72+
return ( propertyValue.toDouble() < mComparisonValue.toDouble() );
73+
}
7474
else
75-
{
76-
return (propertyValue.toString() < mComparisonValue);
77-
}
75+
{
76+
return ( propertyValue.toString() < mComparisonValue );
77+
}
7878
break;
7979
case GREATER:
80-
if(numeric)
81-
{
82-
return (propertyValue.toDouble() > mComparisonValue.toDouble());
83-
}
80+
if ( numeric )
81+
{
82+
return ( propertyValue.toDouble() > mComparisonValue.toDouble() );
83+
}
8484
else
85-
{
86-
return (propertyValue.toString() > mComparisonValue);
87-
}
85+
{
86+
return ( propertyValue.toString() > mComparisonValue );
87+
}
8888
break;
8989
case LESSER_OR_EQUAL:
90-
if(numeric)
91-
{
92-
return (propertyValue.toDouble() <= mComparisonValue.toDouble());
93-
}
90+
if ( numeric )
91+
{
92+
return ( propertyValue.toDouble() <= mComparisonValue.toDouble() );
93+
}
9494
else
95-
{
96-
return (propertyValue.toString() <= mComparisonValue);
97-
}
95+
{
96+
return ( propertyValue.toString() <= mComparisonValue );
97+
}
9898
break;
9999
case GREATER_OR_EQUAL:
100-
if(numeric)
101-
{
102-
return (propertyValue.toDouble() >= mComparisonValue.toDouble());
103-
}
100+
if ( numeric )
101+
{
102+
return ( propertyValue.toDouble() >= mComparisonValue.toDouble() );
103+
}
104104
else
105-
{
106-
return (propertyValue.toString() >= mComparisonValue);
107-
}
105+
{
106+
return ( propertyValue.toString() >= mComparisonValue );
107+
}
108108
break;
109109
case UNKNOWN:
110110
default:
111111
return false;
112-
}
112+
}
113113
return false; //soon...
114114
}

src/mapserver/qgscomparisonfilter.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
qgscomparisonfilter.h
2+
qgscomparisonfilter.h
33
---------------------
44
begin : Jan 31, 2008
55
copyright : (C) 2008 by Marco Hugentobler
@@ -20,7 +20,7 @@
2020

2121
#include <qgsfilter.h>
2222

23-
/**A filter for the comparison operators <,<=,>,>=,!=,=
23+
/**A filter for the comparison operators <,<=,>,>=,!=,=
2424
Sample xml fragment:
2525
<Filter xmlns="http://www.opengis.net/ogc">
2626
<PropertyIsLessThan>
@@ -31,8 +31,8 @@ Sample xml fragment:
3131
*/
3232
class QgsComparisonFilter: public QgsFilter
3333
{
34-
public:
35-
enum COMPARISON_TYPE
34+
public:
35+
enum COMPARISON_TYPE
3636
{
3737
EQUAL,
3838
NOT_EQUAL,
@@ -42,24 +42,24 @@ class QgsComparisonFilter: public QgsFilter
4242
GREATER_OR_EQUAL,
4343
UNKNOWN
4444
};
45-
46-
QgsComparisonFilter();
47-
/**Constructor that takes index of the feature attribute, type of comparison \
48-
and reference value to compare against*/
49-
QgsComparisonFilter(int propertyIndex, COMPARISON_TYPE ct, QString value);
50-
~QgsComparisonFilter();
5145

52-
/**Evaluates a feature against the filter.
53-
@return true if the filter applies for the feature*/
54-
bool evaluate(const QgsFeature& f) const;
55-
56-
//setters and getters
57-
COMPARISON_TYPE comparisonType() const {return mComparisonType;}
58-
void setComparisonType(COMPARISON_TYPE t){mComparisonType = t;}
46+
QgsComparisonFilter();
47+
/**Constructor that takes index of the feature attribute, type of comparison \
48+
and reference value to compare against*/
49+
QgsComparisonFilter( int propertyIndex, COMPARISON_TYPE ct, QString value );
50+
~QgsComparisonFilter();
5951

60-
private:
61-
COMPARISON_TYPE mComparisonType;
62-
QString mComparisonValue;
52+
/**Evaluates a feature against the filter.
53+
@return true if the filter applies for the feature*/
54+
bool evaluate( const QgsFeature& f ) const;
55+
56+
//setters and getters
57+
COMPARISON_TYPE comparisonType() const {return mComparisonType;}
58+
void setComparisonType( COMPARISON_TYPE t ) {mComparisonType = t;}
59+
60+
private:
61+
COMPARISON_TYPE mComparisonType;
62+
QString mComparisonValue;
6363
};
6464

6565
#endif //QGSCOMPARISONFILTER_H

0 commit comments

Comments
 (0)