Various code fixes for building on Mac OSX
This commit is contained in:
parent
bda776ec02
commit
1e74e5a167
|
@ -50,13 +50,13 @@ namespace Bora {
|
|||
SlicingPlotWidget ( QWidget* parent=NULL );
|
||||
virtual ~SlicingPlotWidget ();
|
||||
Cell* getCell ();
|
||||
void setViewer ( CellViewer* );
|
||||
void setViewer ( CellViewer* viewer);
|
||||
void setDatas ();
|
||||
public slots:
|
||||
#if QWT_VERSION < 0x060000
|
||||
void onPointSelect ( const QwtDoublePoint& );
|
||||
void onPointSelect ( const QwtDoublePoint& point);
|
||||
#else
|
||||
void onPointSelect ( const QPointF& );
|
||||
void onPointSelect ( const QPointF& point);
|
||||
#endif
|
||||
void updateSelectedPoint ( double x, double y );
|
||||
signals:
|
||||
|
|
|
@ -48,7 +48,7 @@ void deallocate_heap()
|
|||
|
||||
void heap_init( long n )
|
||||
{
|
||||
register long p;
|
||||
long p;
|
||||
|
||||
allocate_heap( n );
|
||||
_heap_size = 0;
|
||||
|
@ -66,9 +66,9 @@ void heap_insert(
|
|||
long key
|
||||
)
|
||||
{
|
||||
register long k; /* hole in the heap */
|
||||
register long j; /* parent of the hole */
|
||||
register long q; /* heap_elt(j) */
|
||||
long k; /* hole in the heap */
|
||||
long j; /* parent of the hole */
|
||||
long q; /* heap_elt(j) */
|
||||
|
||||
heap_key( p ) = key;
|
||||
|
||||
|
@ -107,9 +107,9 @@ void heap_decrease_key
|
|||
long new_key
|
||||
)
|
||||
{
|
||||
register long k; /* hole in the heap */
|
||||
register long j; /* parent of the hole */
|
||||
register long q; /* heap_elt(j) */
|
||||
long k; /* hole in the heap */
|
||||
long j; /* parent of the hole */
|
||||
long q; /* heap_elt(j) */
|
||||
|
||||
heap_key( p ) = new_key;
|
||||
k = heap_idx( p );
|
||||
|
@ -138,9 +138,9 @@ void heap_decrease_key
|
|||
long heap_delete_min()
|
||||
{
|
||||
long min, last;
|
||||
register long k; /* hole in the heap */
|
||||
register long j; /* child of the hole */
|
||||
register long l_key; /* key of last point */
|
||||
long k; /* hole in the heap */
|
||||
long j; /* child of the hole */
|
||||
long l_key; /* key of last point */
|
||||
|
||||
if( _heap_size == 0 ) /* heap is empty */
|
||||
return( -1 );
|
||||
|
|
|
@ -172,8 +172,8 @@ namespace Cfg {
|
|||
|
||||
void ConfigurationWidget::syncSlaves ()
|
||||
{
|
||||
const map<string,Parameter*>& parameters = Configuration::get()->getParameters ();
|
||||
map<string,Parameter*>::const_iterator iparam = parameters.begin();
|
||||
const map<const string,Parameter*>& parameters = Configuration::get()->getParameters ();
|
||||
map<const string,Parameter*>::const_iterator iparam = parameters.begin();
|
||||
|
||||
for ( ; iparam != parameters.end() ; ++iparam ) {
|
||||
if ( (*iparam).second->getSlaves().empty() ) continue;
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace Cfg {
|
|||
public:
|
||||
class LogEntry {
|
||||
public:
|
||||
inline LogEntry ( std::string id );
|
||||
inline LogEntry ( const std::string id );
|
||||
inline std::string getId () const;
|
||||
inline std::string getValid () const;
|
||||
inline void restore () const;
|
||||
|
@ -50,37 +50,37 @@ namespace Cfg {
|
|||
static Parameter::Priority pushDefaultPriority ( Parameter::Priority );
|
||||
static Parameter::Priority popDefaultPriority ();
|
||||
static Parameter::Priority getDefaultPriority ();
|
||||
static void _tokenize ( std::set<std::string>& tokens, std::string line );
|
||||
static void _tokenize ( std::set<const std::string>& tokens, const std::string line );
|
||||
public:
|
||||
// Methods.
|
||||
ConfigurationWidget* buildWidget ( unsigned int flags );
|
||||
ConfigurationDialog* buildDialog ();
|
||||
inline const std::map<std::string,Parameter*>&
|
||||
inline const std::map<const std::string,Parameter*>&
|
||||
getParameters () const;
|
||||
const std::set<LogEntry>& getLogs ( unsigned int ilog ) const;
|
||||
inline unsigned int getFlags () const;
|
||||
inline const LayoutDescription& getLayout () const;
|
||||
inline LayoutDescription& getLayout ();
|
||||
Parameter* getParameter ( std::string id
|
||||
Parameter* getParameter ( const std::string id
|
||||
, Parameter::Type type=Parameter::Unknown ) const;
|
||||
Parameter* addParameter ( std::string id
|
||||
Parameter* addParameter ( const std::string id
|
||||
, Parameter::Type type
|
||||
, std::string value
|
||||
, const std::string value
|
||||
, Parameter::Priority priority=Parameter::UseDefault );
|
||||
inline void setFlags ( unsigned int mask );
|
||||
inline bool hasLogs ( unsigned int mask ) const;
|
||||
void addLog ( unsigned int mask, std::string id );
|
||||
void removeLog ( unsigned int mask, std::string id );
|
||||
void addLog ( unsigned int mask, const std::string id );
|
||||
void removeLog ( unsigned int mask, const std::string id );
|
||||
inline void restoreFromLogs ( unsigned int mask );
|
||||
inline void clearLogs ( unsigned int mask );
|
||||
void print ( std::ostream& ) const;
|
||||
bool readFromFile ( std::string );
|
||||
bool writeToFile ( std::string, unsigned int flags, std::string tabs="" ) const;
|
||||
void writeToStream ( std::ostream&, unsigned int flags, std::string tabs="" ) const;
|
||||
bool readFromFile ( const std::string );
|
||||
bool writeToFile ( const std::string, unsigned int flags, const std::string tabs="" ) const;
|
||||
void writeToStream ( std::ostream&, unsigned int flags, const std::string tabs="" ) const;
|
||||
private:
|
||||
// Attributes.
|
||||
static Configuration* _singleton;
|
||||
std::map<std::string,Parameter*> _parameters;
|
||||
std::map<const std::string,Parameter*> _parameters;
|
||||
LayoutDescription _layout;
|
||||
unsigned int _flags;
|
||||
std::map< unsigned int, std::set<LogEntry> > _logSets;
|
||||
|
@ -90,7 +90,7 @@ namespace Cfg {
|
|||
|
||||
|
||||
// Inline Methods.
|
||||
inline const std::map<std::string,Parameter*>& Configuration::getParameters () const
|
||||
inline const std::map<const std::string,Parameter*>& Configuration::getParameters () const
|
||||
{ return _parameters; }
|
||||
|
||||
inline const LayoutDescription& Configuration::getLayout () const { return _layout; }
|
||||
|
@ -132,13 +132,13 @@ namespace Cfg {
|
|||
}
|
||||
|
||||
|
||||
inline bool hasParameter ( std::string id )
|
||||
inline bool hasParameter ( const std::string id )
|
||||
{
|
||||
return (Configuration::get()->getParameter(id,Parameter::Unknown) != NULL);
|
||||
}
|
||||
|
||||
|
||||
inline Parameter* getParamString ( std::string id, std::string value="<undefined>" )
|
||||
inline Parameter* getParamString ( const std::string id, std::string value="<undefined>" )
|
||||
{
|
||||
Parameter* parameter = Configuration::get()->getParameter(id,Parameter::String);
|
||||
if ( parameter == NULL ) {
|
||||
|
@ -148,7 +148,7 @@ namespace Cfg {
|
|||
}
|
||||
|
||||
|
||||
inline Parameter* getParamBool ( std::string id, bool value=false )
|
||||
inline Parameter* getParamBool ( const std::string id, bool value=false )
|
||||
{
|
||||
Parameter* parameter = Configuration::get()->getParameter(id,Parameter::Bool);
|
||||
if ( parameter == NULL ) {
|
||||
|
@ -159,7 +159,7 @@ namespace Cfg {
|
|||
}
|
||||
|
||||
|
||||
inline Parameter* getParamInt ( std::string id, int value=0 )
|
||||
inline Parameter* getParamInt ( const std::string id, int value=0 )
|
||||
{
|
||||
//std::cerr << "getParamInt() " << id << " value:" << value << std::endl;
|
||||
|
||||
|
@ -172,7 +172,7 @@ namespace Cfg {
|
|||
}
|
||||
|
||||
|
||||
inline Parameter* getParamEnumerate ( std::string id, int value=0 )
|
||||
inline Parameter* getParamEnumerate ( const std::string id, int value=0 )
|
||||
{
|
||||
Parameter* parameter = Configuration::get()->getParameter(id,Parameter::Enumerate);
|
||||
if ( parameter == NULL ) {
|
||||
|
@ -183,7 +183,7 @@ namespace Cfg {
|
|||
}
|
||||
|
||||
|
||||
inline Parameter* getParamDouble ( std::string id, double value=0.0 )
|
||||
inline Parameter* getParamDouble ( const std::string id, double value=0.0 )
|
||||
{
|
||||
Parameter* parameter = Configuration::get()->getParameter(id,Parameter::Double);
|
||||
if ( parameter == NULL ) {
|
||||
|
@ -194,7 +194,7 @@ namespace Cfg {
|
|||
}
|
||||
|
||||
|
||||
inline Parameter* getParamPercentage ( std::string id, double value=91.0 )
|
||||
inline Parameter* getParamPercentage ( const std::string id, double value=91.0 )
|
||||
{
|
||||
Parameter* parameter = Configuration::get()->getParameter(id,Parameter::Percentage);
|
||||
if ( parameter == NULL ) {
|
||||
|
@ -205,7 +205,7 @@ namespace Cfg {
|
|||
}
|
||||
|
||||
|
||||
inline Configuration::LogEntry::LogEntry ( std::string id )
|
||||
inline Configuration::LogEntry::LogEntry ( const std::string id )
|
||||
: _id (id)
|
||||
, _valid("")
|
||||
{
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <map>
|
||||
//#include <regex>
|
||||
#include <regex>
|
||||
#include <regex.h>
|
||||
#include <boost/program_options.hpp>
|
||||
namespace boptions = boost::program_options;
|
||||
|
|
|
@ -50,8 +50,8 @@ namespace Hurricane {
|
|||
Warning ( const Warning& warning );
|
||||
Warning& operator= ( const Warning& warning );
|
||||
// Methods.
|
||||
inline string getReason () const;
|
||||
inline int getCode () const;
|
||||
inline string getReason () const { return _reason; }
|
||||
inline int getCode () const { return _code; }
|
||||
// Hurricane Managment.
|
||||
virtual string _getTypeName () const;
|
||||
virtual string _getString () const;
|
||||
|
@ -63,11 +63,6 @@ namespace Hurricane {
|
|||
};
|
||||
|
||||
|
||||
// Inline Functions.
|
||||
inline string Warning::getReason () const { return _reason; }
|
||||
inline int Warning::getCode () const { return _code; }
|
||||
|
||||
|
||||
} // Hurricane namespace.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue