From 92ec2280a7e590c2ca09da667c2ad720da1cec24 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 2 Aug 2014 21:18:18 +0000 Subject: [PATCH] Include : - aggiunti Biarchi - aggiornamento interfacce. --- EGkAngle.h | 2 +- EGkBiArcs.h | 28 ++++++++++++++++++++++++++++ EGkFrame3d.h | 2 ++ EGkGdbIterator.h | 2 +- EGkGeomDB.h | 2 +- EgnCmdParser.h | 2 +- EgtLogger.h | 26 +++++++++++++------------- EgtPointerOwner.h | 1 + 8 files changed, 48 insertions(+), 17 deletions(-) create mode 100644 EGkBiArcs.h diff --git a/EGkAngle.h b/EGkAngle.h index 28a9a44..86d261e 100644 --- a/EGkAngle.h +++ b/EGkAngle.h @@ -13,7 +13,6 @@ #pragma once -#include //----------------------- Macro per import/export ---------------------------- #undef EGK_EXPORT @@ -27,3 +26,4 @@ EGK_EXPORT double AngleNearAngle( double dAngDeg, double dAngRefDeg) ; EGK_EXPORT double DiffAngle( double dAng1Deg, double dAng2Deg) ; EGK_EXPORT double MediaAngle( double dAng1Deg, double dAng2Deg, double dCoeff) ; +EGK_EXPORT bool AngleInSpan( double dAngDeg, double dAngRefDeg, double dAngSpanDeg) ; diff --git a/EGkBiArcs.h b/EGkBiArcs.h new file mode 100644 index 0000000..f25d7bb --- /dev/null +++ b/EGkBiArcs.h @@ -0,0 +1,28 @@ +//---------------------------------------------------------------------------- +// EgalTech 2014-2014 +//---------------------------------------------------------------------------- +// File : EGkBiArcs.h Data : 30.07.14 Versione : 1.5g4 +// Contenuto : Dichiarazione funzioni per calcolo biarchi. +// +// +// +// Modifiche : 30.07.14 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EgkCurve.h" + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL + #define EGK_EXPORT __declspec( dllexport) +#else + #define EGK_EXPORT __declspec( dllimport) +#endif + +//----------------------------------------------------------------------------- +EGK_EXPORT ICurve* GetBiArc( const Point3d& ptP0, double dDir0Deg, const Point3d& ptP1, double dDir1Deg, double dU) ; + diff --git a/EGkFrame3d.h b/EGkFrame3d.h index b46de90..b503fce 100644 --- a/EGkFrame3d.h +++ b/EGkFrame3d.h @@ -57,6 +57,8 @@ class EGK_EXPORT Frame3d { this->ToGlob( frRef) ; return *this ;} const Frame3d& operator/=( const Frame3d& frRef) { this->ToLoc( frRef) ; return *this ;} + bool IsValid( void) const + { return ( m_nType != ERR) ; } int GetType( void) const { return m_nType ;} int GetZType( void) const diff --git a/EGkGdbIterator.h b/EGkGdbIterator.h index 56baba1..c0bafd7 100644 --- a/EGkGdbIterator.h +++ b/EGkGdbIterator.h @@ -42,7 +42,7 @@ class __declspec( novtable) IGdbIterator virtual int GetGdbType( void) const = 0 ; virtual IGeoObj* GetGeoObj( void) = 0 ; - virtual IGeoFrame3d* GetGeoFrame( void) = 0 ; + virtual Frame3d* GetGroupFrame( void) = 0 ; virtual bool GetGroupFrame( Frame3d& frGlob) const = 0 ; virtual bool GetGroupGlobFrame( Frame3d& frGlob) const = 0 ; virtual int GetGroupObjs( void) const = 0 ; diff --git a/EGkGeomDB.h b/EGkGeomDB.h index df19d64..ddaad59 100644 --- a/EGkGeomDB.h +++ b/EGkGeomDB.h @@ -50,7 +50,7 @@ class __declspec( novtable) IGeomDB virtual int GetPrev( int nId) const = 0 ; virtual int GetGdbType( int nId) const = 0 ; virtual IGeoObj* GetGeoObj( int nId) = 0 ; - virtual IGeoFrame3d* GetGeoFrame( int nId) = 0 ; + virtual Frame3d* GetGroupFrame( int nId) = 0 ; virtual bool GetGroupFrame( int nId, Frame3d& frGrp) const = 0 ; virtual bool GetGroupGlobFrame( int nId, Frame3d& frGlob) const = 0 ; virtual int GetGroupObjs( int nId) const = 0 ; diff --git a/EgnCmdParser.h b/EgnCmdParser.h index 9a6f983..01af266 100644 --- a/EgnCmdParser.h +++ b/EgnCmdParser.h @@ -45,7 +45,7 @@ class __declspec( novtable) ICmdParser virtual int DirReplace( std::string& sPath) = 0 ; virtual int DirInvReplace( std::string& sPath) = 0 ; virtual int GetIdParam( const std::string& sParam, bool bNewAllowed = false) = 0 ; - virtual bool GetTextParam( const std::string& sParam, std::string& sText) = 0 ; + virtual bool GetStringParam( const std::string& sParam, std::string& sString) = 0 ; virtual bool Run( const std::string& sCmdFile, bool bIsolated = true) = 0 ; virtual bool ExecLine( const std::string& sCmdLine, bool bIsolated = false) = 0 ; } ; diff --git a/EgtLogger.h b/EgtLogger.h index 17447c6..0dd76f4 100644 --- a/EgtLogger.h +++ b/EgtLogger.h @@ -193,20 +193,20 @@ namespace egtlogger if ( bWritten) (*strm) << " " ; - time_t szClock ; - tm newTime ; + // seconds elapsed since midnight, January 1, 1970 + time_t _time ; + time( &_time) ; + // structured time + tm _tm ; + if ( localtime_s( &_tm, &_time) != 0) + (*strm) << "time/date error" ; + // string format + const int DT_LEN = 24 ; + char szDateTime[DT_LEN] = { '\0'} ; + strftime( szDateTime, DT_LEN, "%Y/%m/%d %H:%M:%S", &_tm) ; + // output + (*strm) << szDateTime ; - time( &szClock) ; - localtime_s( &newTime, &szClock) ; - - char strDate[10] = { '\0'} ; - char strTime[10] = { '\0'} ; - - _strdate_s( strDate) ; - _strtime_s( strTime) ; - - (*strm) << strDate << " " << strTime ; - return true ; } diff --git a/EgtPointerOwner.h b/EgtPointerOwner.h index 2864cdd..497afc9 100644 --- a/EgtPointerOwner.h +++ b/EgtPointerOwner.h @@ -19,6 +19,7 @@ template class PtrOwner { public : + explicit PtrOwner( void) : m_pT( nullptr) {} explicit PtrOwner( T* pT) : m_pT( pT) {} ~PtrOwner( void) { Reset() ; } void Set( T* pT) { Reset() ; m_pT = pT ; }