Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the compilation warnings #99

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions osgplugin/ReaderWriterCityGML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ class ReaderWriterCityGML : public osgDB::ReaderWriter

virtual ReadResult readNode( const std::string&, const osgDB::ReaderWriter::Options* ) const override;
virtual ReadResult readNode( std::istream&, const osgDB::ReaderWriter::Options* ) const override;
virtual ReadResult readObject(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const
virtual ReadResult readObject(const std::string& fileName, const osgDB::ReaderWriter::Options* options) const override
{
ReadResult result = readNode(fileName, options);
osg::Node* node = result.getNode();
if (node) return node;
else return result;
}

virtual ReadResult readObject(std::istream& fin, const Options* options) const
virtual ReadResult readObject(std::istream& fin, const Options* options) const override
{
ReadResult result = readNode(fin, options);
osg::Node* node = result.getNode();
Expand Down
1 change: 1 addition & 0 deletions sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ SET(PUBLIC_HEADER
include/citygml/address.h
include/citygml/rectifiedgridcoverage.h
include/citygml/externalreference.h
include/citygml/warnings.h
)


Expand Down
3 changes: 3 additions & 0 deletions sources/include/citygml/address.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <citygml/citygml_api.h>
#include <citygml/object.h>
#include <citygml/warnings.h>

namespace citygml {

Expand All @@ -26,11 +27,13 @@ namespace citygml {
void setThoroughfareNumber(const std::string& thoroughfareNumber);

protected:
PRAGMA_WARN_DLL_BEGIN
std::string m_country;
std::string m_locality;
std::string m_thoroughfareName;
std::string m_thoroughfareNumber;
std::string m_postalCode;
PRAGMA_WARN_DLL_END
};

} /* namespace citygml */
7 changes: 7 additions & 0 deletions sources/include/citygml/appearance.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <citygml/citygml_api.h>
#include <citygml/object.h>
#include <citygml/warnings.h>
#include <citygml/appearancetarget.h>

namespace citygml {
Expand All @@ -14,8 +15,11 @@ namespace citygml {
class Texture;
class GeoreferencedTexture;


PRAGMA_WARN_DLL_BEGIN
class LIBCITYGML_EXPORT Appearance : public Object, public std::enable_shared_from_this<Appearance>
{
PRAGMA_WARN_DLL_END
public:
std::string getType() const;

Expand All @@ -41,8 +45,11 @@ namespace citygml {

protected:
Appearance( const std::string& id, const std::string& typeString );
PRAGMA_WARN_DLL_BEGIN
std::string m_typeString;
std::vector<std::string> m_themes;
PRAGMA_WARN_DLL_END

bool m_isFront;
};

Expand Down
3 changes: 3 additions & 0 deletions sources/include/citygml/appearancemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <unordered_map>

#include <citygml/object.h>
#include <citygml/warnings.h>
#include <citygml/vecs.hpp>

namespace citygml {
Expand Down Expand Up @@ -53,12 +54,14 @@ namespace citygml {


protected:
PRAGMA_WARN_DLL_BEGIN
std::unordered_map<std::string, std::shared_ptr<Appearance> > m_appearancesMap;
std::vector<std::shared_ptr<MaterialTargetDefinition> > m_materialTargetDefinitions;
std::vector<std::shared_ptr<TextureTargetDefinition> > m_texTargetDefinitions;
std::unordered_set<std::string> m_themes;
std::unordered_map<std::string, AppearanceTarget*> m_appearanceTargetsMap;
std::shared_ptr<CityGMLLogger> m_logger;
PRAGMA_WARN_DLL_END

void addThemesFrom(std::shared_ptr<Appearance> surfaceData);
};
Expand Down
3 changes: 3 additions & 0 deletions sources/include/citygml/appearancetarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <citygml/object.h>
#include <citygml/appearancetargetdefinition.h>
#include <citygml/warnings.h>


namespace citygml {
Expand Down Expand Up @@ -45,11 +46,13 @@ namespace citygml {


private:
PRAGMA_WARN_DLL_BEGIN
std::unordered_map<std::string, std::shared_ptr<MaterialTargetDefinition> > m_themeMatMapFront;
std::unordered_map<std::string, std::shared_ptr<MaterialTargetDefinition> > m_themeMatMapBack;

std::unordered_map<std::string, std::shared_ptr<TextureTargetDefinition> > m_themeTexMapFront;
std::unordered_map<std::string, std::shared_ptr<TextureTargetDefinition> > m_themeTexMapBack;
PRAGMA_WARN_DLL_END

};
}
4 changes: 4 additions & 0 deletions sources/include/citygml/appearancetargetdefinition.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <string>

#include <citygml/object.h>
#include <citygml/warnings.h>

namespace citygml {

Expand Down Expand Up @@ -39,8 +40,11 @@ namespace citygml {
virtual ~AppearanceTargetDefinition() {}

protected:
PRAGMA_WARN_DLL_BEGIN
std::string m_targetID;
std::shared_ptr<T> m_appearance;
PRAGMA_WARN_DLL_END

};

}
3 changes: 3 additions & 0 deletions sources/include/citygml/attributesmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <map>

#include <citygml/citygml_api.h>
#include <citygml/warnings.h>

namespace citygml
{
Expand Down Expand Up @@ -45,7 +46,9 @@ class LIBCITYGML_EXPORT AttributeValue
int asInteger(int defaultValue=0) const;
private:
AttributeType m_type;
PRAGMA_WARN_DLL_BEGIN
std::string m_value;
PRAGMA_WARN_DLL_END
};

LIBCITYGML_EXPORT std::ostream& operator<<(std::ostream& os, const AttributeValue& o);
Expand Down
3 changes: 3 additions & 0 deletions sources/include/citygml/citygml.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <citygml/cityobject.h>
#include <citygml/envelope.h>
#include <citygml/tesselatorbase.h>
#include <citygml/warnings.h>

namespace citygml
{
Expand Down Expand Up @@ -82,8 +83,10 @@ namespace citygml
bool pruneEmptyObjects;
bool tesselate;
bool keepVertices;
PRAGMA_WARN_DLL_BEGIN
std::string destSRS;
std::string srcSRS;
PRAGMA_WARN_DLL_END
};

LIBCITYGML_EXPORT std::shared_ptr<const CityModel> load( std::istream& stream, const ParserParams& params, std::unique_ptr<TesselatorBase> tesselator, std::shared_ptr<CityGMLLogger> logger = nullptr);
Expand Down
3 changes: 3 additions & 0 deletions sources/include/citygml/citygmlfactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <citygml/geometry.h>
#include <citygml/cityobject.h>
#include <citygml/externalreference.h>
#include <citygml/warnings.h>

#include <memory>

Expand Down Expand Up @@ -70,10 +71,12 @@ namespace citygml {
protected:
void appearanceTargetCreated(AppearanceTarget* obj);

PRAGMA_WARN_DLL_BEGIN
std::shared_ptr<CityGMLLogger> m_logger;
std::unique_ptr<AppearanceManager> m_appearanceManager;
std::unique_ptr<PolygonManager> m_polygonManager;
std::unique_ptr<GeometryManager> m_geometryManager;
PRAGMA_WARN_DLL_END
};

}
3 changes: 3 additions & 0 deletions sources/include/citygml/citymodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <citygml/citygml_api.h>
#include <citygml/cityobject.h>
#include <citygml/featureobject.h>
#include <citygml/warnings.h>

class TesselatorBase;

Expand Down Expand Up @@ -54,13 +55,15 @@ namespace citygml {

void addToCityObjectsMapRecursive(const CityObject* cityObj);

PRAGMA_WARN_DLL_BEGIN
CityObjects m_roots;

CityObjectsMap m_cityObjectsMap;

std::string m_srsName;

std::vector<std::string> m_themes;
PRAGMA_WARN_DLL_END
};

LIBCITYGML_EXPORT std::ostream& operator<<( std::ostream&, const citygml::CityModel & );
Expand Down
3 changes: 3 additions & 0 deletions sources/include/citygml/cityobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <citygml/enum_type_bitmask.h>
#include <citygml/rectifiedgridcoverage.h>
#include <citygml/externalreference.h>
#include <citygml/warnings.h>
class TesselatorBase;

namespace citygml {
Expand Down Expand Up @@ -141,12 +142,14 @@ namespace citygml {
protected:
CityObjectsType m_type;

PRAGMA_WARN_DLL_BEGIN
std::vector<std::unique_ptr<Geometry> > m_geometries;
std::vector<std::unique_ptr<ImplicitGeometry> > m_implicitGeometries;
std::vector<std::unique_ptr<CityObject> > m_children;
std::unique_ptr<Address> m_address;
std::unique_ptr<RectifiedGridCoverage> m_rectifiedGridCoverage;
std::unique_ptr<ExternalReference> m_externalReference;
PRAGMA_WARN_DLL_END
};

LIBCITYGML_EXPORT std::ostream& operator<<( std::ostream& os, const CityObject& o );
Expand Down
3 changes: 3 additions & 0 deletions sources/include/citygml/envelope.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <citygml/citygml_api.h>
#include <citygml/vecs.hpp>
#include <citygml/warnings.h>

namespace citygml {

Expand Down Expand Up @@ -36,9 +37,11 @@ namespace citygml {
const bool validBounds() const;

protected:
PRAGMA_WARN_DLL_BEGIN
TVec3d m_lowerBound;
TVec3d m_upperBound;
std::string m_srsName;
PRAGMA_WARN_DLL_END
};

LIBCITYGML_EXPORT std::ostream& operator<<( std::ostream&, const citygml::Envelope& );
Expand Down
5 changes: 5 additions & 0 deletions sources/include/citygml/externalreference.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#pragma once

#include <citygml/object.h>
#include <citygml/warnings.h>


namespace citygml {
union LIBCITYGML_EXPORT ExternalObjectReference {
PRAGMA_WARN_DLL_BEGIN
std::string name;
std::string uri;
PRAGMA_WARN_DLL_END

ExternalObjectReference();
~ExternalObjectReference();
Expand All @@ -19,7 +22,9 @@ namespace citygml {
ExternalReference(std::string const& id);
// ~ExternalReference() noexcept override; // Destructor
public:
PRAGMA_WARN_DLL_BEGIN
std::string informationSystem;
PRAGMA_WARN_DLL_END
ExternalObjectReference externalObject;
};
}
3 changes: 3 additions & 0 deletions sources/include/citygml/featureobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <citygml/object.h>
#include <citygml/envelope.h>
#include <citygml/warnings.h>

namespace citygml {

Expand All @@ -19,7 +20,9 @@ namespace citygml {
virtual ~FeatureObject();

protected:
PRAGMA_WARN_DLL_BEGIN
std::unique_ptr<Envelope> m_envelope;
PRAGMA_WARN_DLL_END
};

}
3 changes: 3 additions & 0 deletions sources/include/citygml/geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <citygml/citygml_api.h>
#include <citygml/appearancetarget.h>
#include <citygml/warnings.h>

class TesselatorBase;

Expand Down Expand Up @@ -87,12 +88,14 @@ namespace citygml {

unsigned int m_lod;

PRAGMA_WARN_DLL_BEGIN
std::string m_srsName;

std::vector<std::shared_ptr<Geometry> > m_childGeometries;

std::vector<std::shared_ptr<Polygon> > m_polygons;
std::vector<std::shared_ptr<LineString> > m_lineStrings;
PRAGMA_WARN_DLL_END
};

LIBCITYGML_EXPORT std::ostream& operator<<( std::ostream& os, const citygml::Geometry& s );
Expand Down
3 changes: 3 additions & 0 deletions sources/include/citygml/geometrymanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <vector>

#include <citygml/citygml_api.h>
#include <citygml/warnings.h>

namespace citygml {

Expand Down Expand Up @@ -36,9 +37,11 @@ namespace citygml {
std::string geometryID;
};

PRAGMA_WARN_DLL_BEGIN
std::shared_ptr<CityGMLLogger> m_logger;
std::vector<GeometryRequest> m_geometryRequests;
std::unordered_map<std::string, std::shared_ptr<Geometry> > m_sharedGeometries;
PRAGMA_WARN_DLL_END
};

}
3 changes: 3 additions & 0 deletions sources/include/citygml/implictgeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <citygml/object.h>
#include <citygml/transformmatrix.h>
#include <citygml/warnings.h>
#include <citygml/vecs.hpp>

namespace citygml {
Expand Down Expand Up @@ -38,8 +39,10 @@ namespace citygml {
ImplicitGeometry(const std::string& id);

TransformationMatrix m_matrix;
PRAGMA_WARN_DLL_BEGIN
TVec3d m_referencePoint;
std::vector<std::shared_ptr<Geometry> > m_geometries;
std::string m_srsName;
PRAGMA_WARN_DLL_END
};
}
3 changes: 3 additions & 0 deletions sources/include/citygml/linearring.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <citygml/citygml_api.h>
#include <citygml/object.h>
#include <citygml/warnings.h>
#include <citygml/vecs.hpp>

namespace citygml {
Expand Down Expand Up @@ -36,7 +37,9 @@ namespace citygml {
protected:
bool m_exterior;

PRAGMA_WARN_DLL_BEGIN
std::vector<TVec3d> m_vertices;
PRAGMA_WARN_DLL_END
};

}
Loading
Loading