Commit eaca04a3 authored by Armin Erraji's avatar Armin Erraji

Merge remote-tracking branch 'remotes/origin/develop' into ma_2018/erraji

parents 08121009 b8641873
......@@ -122,7 +122,7 @@ namespace ITAGeo
virtual std::stringstream ToJSON(std::shared_ptr< const CResourceManager > pResourceManager = nullptr) const;
//! Load properties from JSON formatted string
virtual void LoadFromJSONString(const std::string sContent, std::shared_ptr< CResourceManager > pResourceManager = nullptr);
virtual void LoadFromJSONString(const std::string& sContent, std::shared_ptr< CResourceManager > pResourceManager = nullptr);
};
......@@ -170,7 +170,7 @@ namespace ITAGeo
std::stringstream ToJSON(std::shared_ptr< const CResourceManager > pResourceManager) const;
//! Load properties from JSON formatted string
void LoadFromJSONString(const std::string sContent, std::shared_ptr< CResourceManager > pResourceManager = nullptr);
void LoadFromJSONString(const std::string& sContent, std::shared_ptr< CResourceManager > pResourceManager = nullptr);
};
//! A sensor / sound receiver / listener
......@@ -205,10 +205,10 @@ namespace ITAGeo
//! Returns a string with the properties of the object
std::string ToString() const;
std::stringstream ToJSON(std::shared_ptr< CResourceManager > pResourceManager = nullptr) const;
std::stringstream ToJSON(std::shared_ptr< const CResourceManager > pResourceManager = nullptr) const;
//! Load properties from JSON formatted string
void LoadFromJSONString(const std::string sContent, std::shared_ptr< CResourceManager > pResourceManager = nullptr);
void LoadFromJSONString(const std::string& sContent, std::shared_ptr< CResourceManager > pResourceManager = nullptr);
int GetNumChannels() const;
};
......@@ -284,14 +284,14 @@ namespace ITAGeo
inline virtual ~CMirrorImage() {};
//! Copy data from another anchor (has to be overwritten by derived classes!)
virtual void CopyFromAnchor(std::shared_ptr< const ITAGeo::CPropagationAnchor > pOther, ITAGeo::Material::IManager* pManager = nullptr);
virtual void CopyFromAnchor(std::shared_ptr< const ITAGeo::CPropagationAnchor > pOther);
//! Returns a string with the properties of the object
std::string ToString() const;
std::stringstream ToJSON() const;
std::stringstream ToJSON( std::shared_ptr< const ITAGeo::CResourceManager > pResourceManager = nullptr ) const;
//! Load properties from JSON formatted string
void LoadFromJSONString(const std::string sContent);
void LoadFromJSONString( const std::string& sContent, std::shared_ptr< ITAGeo::CResourceManager > pResourceManager = nullptr );
private:
inline const CMirrorImage operator=(const CMirrorImage&)
......@@ -324,7 +324,7 @@ namespace ITAGeo
std::stringstream ToJSON(std::shared_ptr< const CResourceManager > pResourceManager = nullptr) const;
//! Load properties from JSON formatted string
void LoadFromJSONString(const std::string sContent, std::shared_ptr< CResourceManager > pResourceManager = nullptr);
void LoadFromJSONString(const std::string& sContent, std::shared_ptr< CResourceManager > pResourceManager = nullptr);
std::shared_ptr< Material::IMaterial > pMaterial; //!< Acoustic material connection, i.e. absorption coefficient
};
......@@ -343,13 +343,13 @@ namespace ITAGeo
/**
* Will throw @CITAException on error
*/
void Store(const std::string& sFilePath, bool bOverwrite = true) const;
void Store(const std::string& sFilePath, bool bOverwrite = true, std::shared_ptr< const ITAGeo::CResourceManager > pResourceManager = nullptr) const;
//! Loads path from file (*.xml or *.json, if supported)
/**
* Will throw @CITAException on error
*/
void Load(const std::string& sFilePath);
void Load( const std::string& sFilePath, std::shared_ptr< ITAGeo::CResourceManager > pResourceManager = nullptr );
static inline std::string GetTypeStr()
{
......@@ -385,10 +385,10 @@ namespace ITAGeo
double GetAccumulatedDiffractionAnglesRad() const;
//! Returns a json formatted stringstream with the properties of the object
std::stringstream ToJSON( std::shared_ptr< CResourceManager > = nullptr ) const;
std::stringstream ToJSON( std::shared_ptr< const CResourceManager > pResourceManager = nullptr ) const;
//! Load properties from JSON formatted string
void LoadFromJSONString(const std::string sContent, std::shared_ptr< CResourceManager > = nullptr);
//! ( properties from JSON formatted string
void LoadFromJSONString( const std::string& sContent, std::shared_ptr< CResourceManager > pResourceManager = nullptr );
};
......@@ -417,13 +417,13 @@ namespace ITAGeo
/**
* Will throw @CITAException on error
*/
void Store(const std::string& sFilePath, bool bOverwrite = true) const;
void Store( const std::string& sFilePath, bool bOverwrite = true, std::shared_ptr< const ITAGeo::CResourceManager > pResourceManager = nullptr ) const;
//! Loads path list from file (*.xml or *.json, if supported)
/**
* Will throw @CITAException on error
*/
void Load(const std::string& sFilePath);
void Load( const std::string& sFilePath, std::shared_ptr< ITAGeo::CResourceManager > pResourceManager = nullptr );
//! Get type string of class.
static inline std::string GetTypeStr()
......@@ -432,10 +432,10 @@ namespace ITAGeo
};
//! Returns a json formatted stringstream with the properties of the object
std::stringstream ToJSON() const;
std::stringstream ToJSON( std::shared_ptr< const ITAGeo::CResourceManager > pResourceManager = nullptr ) const;
//! Load properties from JSON formatted string
void LoadFromJSONString(const std::string sContent);
void LoadFromJSONString( const std::string& sContent, std::shared_ptr< ITAGeo::CResourceManager > pResourceManager = nullptr );
};
......@@ -570,10 +570,10 @@ namespace ITAGeo
//! Returns a string with the properties of the object
std::string ToString() const;
std::stringstream ToJSON() const;
std::stringstream ToJSON( std::shared_ptr< const ITAGeo::CResourceManager > pResourceManager = nullptr ) const;
//! Load properties from JSON formatted string
void LoadFromJSONString(const std::string sContent);
void LoadFromJSONString( const std::string& sContent, std::shared_ptr< ITAGeo::CResourceManager > pResourceManager = nullptr );
};
......@@ -617,15 +617,6 @@ inline std::ostream& operator<<(std::ostream& os, const ITAGeo::CPropagationAnch
return os;
};
/*
inline std::ostream& operator<<( std::ostream& os, const ITAGeo::CPropagationAnchor* pAnchor )
{
ITAGeo::CPropagationAnchor oAnchor( *pAnchor );
os << oAnchor; // error C2593 @todo solve
return os;
};
*/
inline std::ostream& operator<<(std::ostream& os, const ITAGeo::CPropagationPath& oPath)
{
os << "GeoPropagationPath [" << oPath.sIdentifier << "]: num anchors " << oPath.size() << std::endl;
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment