Skip to content
Permalink
Browse files
mapserver indentation update
git-svn-id: http://svn.osgeo.org/qgis/trunk@14112 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 21, 2010
1 parent 4e4643d commit 514b251b47f0117585d200515d31188c75df70a7
Showing with 5,785 additions and 5,767 deletions.
  1. +249 −249 src/mapserver/qgis_map_serv.cpp
  2. +20 −20 src/mapserver/qgsbetweenfilter.cpp
  3. +18 −18 src/mapserver/qgsbetweenfilter.h
  4. +61 −61 src/mapserver/qgscomparisonfilter.cpp
  5. +20 −20 src/mapserver/qgscomparisonfilter.h
  6. +15 −15 src/mapserver/qgsconfigcache.cpp
  7. +97 −97 src/mapserver/qgsconfigparser.cpp
  8. +10 −10 src/mapserver/qgsconfigparser.h
  9. +4 −4 src/mapserver/qgsepsgcache.cpp
  10. +112 −112 src/mapserver/qgsfilter.cpp
  11. +25 −25 src/mapserver/qgsfilter.h
  12. +39 −39 src/mapserver/qgsftptransaction.cpp
  13. +17 −17 src/mapserver/qgsftptransaction.h
  14. +221 −221 src/mapserver/qgsgetrequesthandler.cpp
  15. +9 −9 src/mapserver/qgsgetrequesthandler.h
  16. +51 −51 src/mapserver/qgshostedrdsbuilder.cpp
  17. +7 −7 src/mapserver/qgshostedrdsbuilder.h
  18. +49 −49 src/mapserver/qgshostedvdsbuilder.cpp
  19. +5 −5 src/mapserver/qgshostedvdsbuilder.h
  20. +19 −19 src/mapserver/qgshttprequesthandler.cpp
  21. +6 −6 src/mapserver/qgshttprequesthandler.h
  22. +74 −74 src/mapserver/qgsinterpolationlayerbuilder.cpp
  23. +17 −17 src/mapserver/qgsinterpolationlayerbuilder.h
  24. +28 −28 src/mapserver/qgslogicalfilter.cpp
  25. +19 −19 src/mapserver/qgslogicalfilter.h
  26. +15 −15 src/mapserver/qgsmapserverlogger.cpp
  27. +17 −17 src/mapserver/qgsmapserverlogger.h
  28. +3 −3 src/mapserver/qgsmapserviceexception.cpp
  29. +8 −8 src/mapserver/qgsmapserviceexception.h
  30. +47 −47 src/mapserver/qgsmslayerbuilder.cpp
  31. +23 −23 src/mapserver/qgsmslayerbuilder.h
  32. +76 −76 src/mapserver/qgsmslayercache.cpp
  33. +30 −30 src/mapserver/qgsmslayercache.h
  34. +33 −33 src/mapserver/qgsmsutils.cpp
  35. +3 −3 src/mapserver/qgsmsutils.h
  36. +158 −158 src/mapserver/qgsprojectparser.cpp
  37. +7 −7 src/mapserver/qgsprojectparser.h
  38. +75 −75 src/mapserver/qgsremotedatasourcebuilder.cpp
  39. +12 −12 src/mapserver/qgsremotedatasourcebuilder.h
  40. +262 −262 src/mapserver/qgsremoteowsbuilder.cpp
  41. +18 −18 src/mapserver/qgsremoteowsbuilder.h
  42. +16 −16 src/mapserver/qgsrequesthandler.h
  43. +76 −76 src/mapserver/qgssentdatasourcebuilder.cpp
  44. +20 −20 src/mapserver/qgssentdatasourcebuilder.h
  45. +1,509 −1,497 src/mapserver/qgssldparser.cpp
  46. +95 −95 src/mapserver/qgssldparser.h
  47. +32 −32 src/mapserver/qgssldrenderer.cpp
  48. +35 −35 src/mapserver/qgssldrenderer.h
  49. +579 −579 src/mapserver/qgssldrule.cpp
  50. +48 −48 src/mapserver/qgssldrule.h
  51. +647 −642 src/mapserver/qgssoaprequesthandler.cpp
  52. +20 −20 src/mapserver/qgssoaprequesthandler.h
  53. +658 −657 src/mapserver/qgswmsserver.cpp
  54. +71 −71 src/mapserver/qgswmsserver.h

Large diffs are not rendered by default.

@@ -1,5 +1,5 @@
/***************************************************************************
qgsbetweenfilter.cpp
qgsbetweenfilter.cpp
--------------------
begin : Feb 07, 2008
copyright : (C) 2008 by Marco Hugentobler
@@ -17,35 +17,35 @@

#include "qgsbetweenfilter.h"

QgsBetweenFilter::QgsBetweenFilter(): QgsFilter(-1)
QgsBetweenFilter::QgsBetweenFilter(): QgsFilter( -1 )
{
}
QgsBetweenFilter::QgsBetweenFilter(int attributeIndex, const QString& lowerValue, const QString& upperValue): QgsFilter(attributeIndex), mLowerValue(lowerValue), mUpperValue(upperValue)

QgsBetweenFilter::QgsBetweenFilter( int attributeIndex, const QString& lowerValue, const QString& upperValue ): QgsFilter( attributeIndex ), mLowerValue( lowerValue ), mUpperValue( upperValue )
{
}

QgsBetweenFilter::~QgsBetweenFilter()
{
}

bool QgsBetweenFilter::evaluate(const QgsFeature& f) const
bool QgsBetweenFilter::evaluate( const QgsFeature& f ) const
{
QVariant propertyValue = propertyIndexValue(f);
QVariant propertyValue = propertyIndexValue( f );

//numeric or alphanumeric?
bool numeric = true;
if (propertyValue.type() == QVariant::String)
{
numeric = false;
}
if(numeric)
{
return (propertyValue.toDouble() >= mLowerValue.toDouble() && propertyValue.toDouble() <= mUpperValue.toDouble());
}
if ( propertyValue.type() == QVariant::String )
{
numeric = false;
}

if ( numeric )
{
return ( propertyValue.toDouble() >= mLowerValue.toDouble() && propertyValue.toDouble() <= mUpperValue.toDouble() );
}
else
{
return (propertyValue.toString() >= mLowerValue && propertyValue.toString() <= mUpperValue);
}
{
return ( propertyValue.toString() >= mLowerValue && propertyValue.toString() <= mUpperValue );
}
}
@@ -1,5 +1,5 @@
/***************************************************************************
qgsbetweenfilter.h
qgsbetweenfilter.h
-------------------
begin : Feb 07, 2008
copyright : (C) 2008 by Marco Hugentobler
@@ -36,24 +36,24 @@ Sample xml fragment:
*/
class QgsBetweenFilter: public QgsFilter
{
public:
QgsBetweenFilter();
QgsBetweenFilter(int attributeIndex, const QString& lowerValue, const QString& upperValue);
~QgsBetweenFilter();

/**Evaluates a feature against the filter.
@return true if the filter applies for the feature*/
bool evaluate(const QgsFeature& f) const;
QString lowerValue() const {return mLowerValue;}
QString upperValue() const {return mUpperValue;}
void setLowerValue(const QString& lv){mLowerValue = lv;}
void setUpperValue(const QString& uv){mUpperValue = uv;}
public:
QgsBetweenFilter();
QgsBetweenFilter( int attributeIndex, const QString& lowerValue, const QString& upperValue );
~QgsBetweenFilter();

private:
/**Lower boundary*/
QString mLowerValue;
/**Upper boundary*/
QString mUpperValue;
/**Evaluates a feature against the filter.
@return true if the filter applies for the feature*/
bool evaluate( const QgsFeature& f ) const;
QString lowerValue() const {return mLowerValue;}
QString upperValue() const {return mUpperValue;}
void setLowerValue( const QString& lv ) {mLowerValue = lv;}
void setUpperValue( const QString& uv ) {mUpperValue = uv;}

private:
/**Lower boundary*/
QString mLowerValue;
/**Upper boundary*/
QString mUpperValue;
};

#endif //QGSBETWEENFILTER_H
@@ -1,5 +1,5 @@
/***************************************************************************
qgscomparisonfilter.cpp
qgscomparisonfilter.cpp
-----------------------
begin : Jan 31, 2008
copyright : (C) 2008 by Marco Hugentobler
@@ -17,98 +17,98 @@

#include "qgscomparisonfilter.h"

QgsComparisonFilter::QgsComparisonFilter(): QgsFilter(), mComparisonType(QgsComparisonFilter::UNKNOWN)
QgsComparisonFilter::QgsComparisonFilter(): QgsFilter(), mComparisonType( QgsComparisonFilter::UNKNOWN )
{
}
QgsComparisonFilter::QgsComparisonFilter(int propertyIndex, COMPARISON_TYPE ct, QString value): QgsFilter(propertyIndex), mComparisonType(ct), mComparisonValue(value)

QgsComparisonFilter::QgsComparisonFilter( int propertyIndex, COMPARISON_TYPE ct, QString value ): QgsFilter( propertyIndex ), mComparisonType( ct ), mComparisonValue( value )
{
}

QgsComparisonFilter::~QgsComparisonFilter()
{
}

bool QgsComparisonFilter::evaluate(const QgsFeature& f) const
bool QgsComparisonFilter::evaluate( const QgsFeature& f ) const
{
QVariant propertyValue = propertyIndexValue(f);
if(!propertyValue.isValid())
{
return false;
}
QVariant propertyValue = propertyIndexValue( f );

if ( !propertyValue.isValid() )
{
return false;
}

bool numeric = true;
if (propertyValue.type() == QVariant::String)
{
numeric = false;
}
if ( propertyValue.type() == QVariant::String )
{
numeric = false;
}

switch(mComparisonType)
{
switch ( mComparisonType )
{
case EQUAL:
if(numeric)
{
return (propertyValue.toDouble() == mComparisonValue.toDouble());
}
if ( numeric )
{
return ( propertyValue.toDouble() == mComparisonValue.toDouble() );
}
else
{
return (propertyValue.toString() == mComparisonValue);
}
{
return ( propertyValue.toString() == mComparisonValue );
}
break;
case NOT_EQUAL:
if(numeric)
{
return (propertyValue.toDouble() != mComparisonValue.toDouble());
}
if ( numeric )
{
return ( propertyValue.toDouble() != mComparisonValue.toDouble() );
}
else
{
return (propertyValue.toString() != mComparisonValue);
}
{
return ( propertyValue.toString() != mComparisonValue );
}
break;
case LESSER:
if(numeric)
{
return (propertyValue.toDouble() < mComparisonValue.toDouble());
}
if ( numeric )
{
return ( propertyValue.toDouble() < mComparisonValue.toDouble() );
}
else
{
return (propertyValue.toString() < mComparisonValue);
}
{
return ( propertyValue.toString() < mComparisonValue );
}
break;
case GREATER:
if(numeric)
{
return (propertyValue.toDouble() > mComparisonValue.toDouble());
}
if ( numeric )
{
return ( propertyValue.toDouble() > mComparisonValue.toDouble() );
}
else
{
return (propertyValue.toString() > mComparisonValue);
}
{
return ( propertyValue.toString() > mComparisonValue );
}
break;
case LESSER_OR_EQUAL:
if(numeric)
{
return (propertyValue.toDouble() <= mComparisonValue.toDouble());
}
if ( numeric )
{
return ( propertyValue.toDouble() <= mComparisonValue.toDouble() );
}
else
{
return (propertyValue.toString() <= mComparisonValue);
}
{
return ( propertyValue.toString() <= mComparisonValue );
}
break;
case GREATER_OR_EQUAL:
if(numeric)
{
return (propertyValue.toDouble() >= mComparisonValue.toDouble());
}
if ( numeric )
{
return ( propertyValue.toDouble() >= mComparisonValue.toDouble() );
}
else
{
return (propertyValue.toString() >= mComparisonValue);
}
{
return ( propertyValue.toString() >= mComparisonValue );
}
break;
case UNKNOWN:
default:
return false;
}
}
return false; //soon...
}
@@ -1,5 +1,5 @@
/***************************************************************************
qgscomparisonfilter.h
qgscomparisonfilter.h
---------------------
begin : Jan 31, 2008
copyright : (C) 2008 by Marco Hugentobler
@@ -20,7 +20,7 @@

#include <qgsfilter.h>

/**A filter for the comparison operators <,<=,>,>=,!=,=
/**A filter for the comparison operators <,<=,>,>=,!=,=
Sample xml fragment:
<Filter xmlns="http://www.opengis.net/ogc">
<PropertyIsLessThan>
@@ -31,8 +31,8 @@ Sample xml fragment:
*/
class QgsComparisonFilter: public QgsFilter
{
public:
enum COMPARISON_TYPE
public:
enum COMPARISON_TYPE
{
EQUAL,
NOT_EQUAL,
@@ -42,24 +42,24 @@ class QgsComparisonFilter: public QgsFilter
GREATER_OR_EQUAL,
UNKNOWN
};

QgsComparisonFilter();
/**Constructor that takes index of the feature attribute, type of comparison \
and reference value to compare against*/
QgsComparisonFilter(int propertyIndex, COMPARISON_TYPE ct, QString value);
~QgsComparisonFilter();

/**Evaluates a feature against the filter.
@return true if the filter applies for the feature*/
bool evaluate(const QgsFeature& f) const;

//setters and getters
COMPARISON_TYPE comparisonType() const {return mComparisonType;}
void setComparisonType(COMPARISON_TYPE t){mComparisonType = t;}
QgsComparisonFilter();
/**Constructor that takes index of the feature attribute, type of comparison \
and reference value to compare against*/
QgsComparisonFilter( int propertyIndex, COMPARISON_TYPE ct, QString value );
~QgsComparisonFilter();

private:
COMPARISON_TYPE mComparisonType;
QString mComparisonValue;
/**Evaluates a feature against the filter.
@return true if the filter applies for the feature*/
bool evaluate( const QgsFeature& f ) const;

//setters and getters
COMPARISON_TYPE comparisonType() const {return mComparisonType;}
void setComparisonType( COMPARISON_TYPE t ) {mComparisonType = t;}

private:
COMPARISON_TYPE mComparisonType;
QString mComparisonValue;
};

#endif //QGSCOMPARISONFILTER_H
Loading

0 comments on commit 514b251

Please sign in to comment.