From d7a307339ecfdf7911fe2c54a82e191cdb97a9ca Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 10 Mar 2014 11:37:57 +0000 Subject: [PATCH] -Include : - aggiunte ad interfacce. --- EGkGdbIterator.h | 6 ++++++ EGkGeomDB.h | 6 ++++++ EGkStringUtils3d.h | 27 ++++++++++++++++++++++----- EGnStringBase.h | 2 ++ 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/EGkGdbIterator.h b/EGkGdbIterator.h index b78c960..61c4ee5 100644 --- a/EGkGdbIterator.h +++ b/EGkGdbIterator.h @@ -45,6 +45,12 @@ class __declspec( novtable) IGdbIterator virtual bool GetGlobFrame( Frame3d& frGlob) const = 0 ; virtual bool SetColor( Color cCol) = 0 ; virtual bool GetColor( Color& cCol) const = 0 ; + virtual bool SetName( const std::string& sName) = 0 ; + virtual bool GetName( std::string& sName) const = 0 ; + virtual bool RemoveName( void) = 0 ; + virtual bool SetInfo( const std::string& sKey, const std::string& sInfo) = 0 ; + virtual bool GetInfo( const std::string& sKey, std::string& sInfo) const = 0 ; + virtual bool RemoveInfo( const std::string& sKey) = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EGkGeomDB.h b/EGkGeomDB.h index cd147c3..0a462eb 100644 --- a/EGkGeomDB.h +++ b/EGkGeomDB.h @@ -69,6 +69,12 @@ class __declspec( novtable) IGeomDB virtual bool GetDefaultColor( Color& cCol) const = 0 ; virtual bool SetColor( int nId, Color cCol) = 0 ; virtual bool GetColor( int nId, Color& cCol) const = 0 ; + virtual bool SetName( int nId, const std::string& sName) = 0 ; + virtual bool GetName( int nId, std::string& sName) const = 0 ; + virtual bool RemoveName( int nId) = 0 ; + virtual bool SetInfo( int nId, const std::string& sKey, const std::string& sInfo) = 0 ; + virtual bool GetInfo( int nId, const std::string& sKey, std::string& sInfo) const = 0 ; + virtual bool RemoveInfo( int nId, const std::string& sKey) = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EGkStringUtils3d.h b/EGkStringUtils3d.h index d2afa1a..47ba7f5 100644 --- a/EGkStringUtils3d.h +++ b/EGkStringUtils3d.h @@ -1,20 +1,20 @@ //---------------------------------------------------------------------------- // EgalTech 2013-2014 //---------------------------------------------------------------------------- -// File : EgkStringUtils3d.h Data : 31.01.14 Versione : 1.5a9 +// File : EgkStringUtils3d.h Data : 10.03.14 Versione : 1.5c3 // Contenuto : Dichiarazione delle funzioni di utilità 3d per le stringhe. // // // // Modifiche : 31.01.14 DS Creazione modulo. -// +// 10.03.14 DS Aggiunte lettura/scrittura Frame3d. // //---------------------------------------------------------------------------- #pragma once #include "/EgtDev/Include/EGnStringUtils.h" -#include "/EgtDev/Include/EGkPoint3d.h" +#include "/EgtDev/Include/EGkFrame3d.h" //----------------------- Macro per import/export ----------------------------- #undef EGK_EXPORT @@ -28,15 +28,32 @@ EGK_EXPORT bool FromString( const std::string& sVal, Vector3d& vtVal) ; EGK_EXPORT bool FromString( const std::string& sVal, Point3d& ptVal) ; EGK_EXPORT bool FromString( const std::string& sVal, Point3d& ptVal, double& dW) ; +EGK_EXPORT bool FromString( const std::string& sVal, Frame3d& frFrame) ; inline const std::string -ToString( Vector3d vtVal, int nPrec = 9) +ToString( const Vector3d& vtVal, int nPrec = 9) { std::string sBuff ; sBuff.reserve( 3 * 32 + 2) ; sBuff = ToString( vtVal.x, nPrec) + ',' + ToString( vtVal.y, nPrec) + ',' + ToString( vtVal.z, nPrec) ; return sBuff ; } inline const std::string -ToString( Point3d ptVal, int nPrec = 6) +ToString( const Point3d& ptVal, int nPrec = 6) { std::string sBuff ; sBuff.reserve( 3 * 32 + 2) ; sBuff = ToString( ptVal.x, nPrec) + ',' + ToString( ptVal.y, nPrec) + ',' + ToString( ptVal.z, nPrec) ; return sBuff ; } +inline const std::string +ToString( const Point3d& ptVal, double dW, int nPrec = 6) + { std::string sBuff ; + sBuff.reserve( 3 * 32 + 2) ; + sBuff = ToString( ptVal.x, nPrec) + ',' + ToString( ptVal.y, nPrec) + ',' + ToString( ptVal.z, nPrec) + + ',' + ToString( dW, nPrec) ; + return sBuff ; } +inline const std::string +ToString( const Frame3d& frF, int nPrecP = 6, int nPrecV = 9) + { std::string sBuff ; + sBuff.reserve( 12 * 32 + 2) ; + sBuff = ToString( frF.Orig().x, nPrecP) + ',' + ToString( frF.Orig().y, nPrecP) + ',' + ToString( frF.Orig().z, nPrecP) + ',' + + ToString( frF.VersX().x, nPrecV) + ',' + ToString( frF.VersX().y, nPrecV) + ',' + ToString( frF.VersX().z, nPrecV) + ',' + + ToString( frF.VersY().x, nPrecV) + ',' + ToString( frF.VersY().y, nPrecV) + ',' + ToString( frF.VersY().z, nPrecV) + ',' + + ToString( frF.VersZ().x, nPrecV) + ',' + ToString( frF.VersZ().y, nPrecV) + ',' + ToString( frF.VersZ().z, nPrecV) ; + return sBuff ; } diff --git a/EGnStringBase.h b/EGnStringBase.h index f9176d3..cb52fea 100644 --- a/EGnStringBase.h +++ b/EGnStringBase.h @@ -15,6 +15,8 @@ #include #include +#include //---------------------------------------------------------------------------- typedef std::vector STRVECTOR ; +typedef std::list STRLIST ;