-
/* This file is part of Evoral.
- * Copyright (C) 2008 Dave Robillard <http://drobilla.net>
+ * Copyright (C) 2008 David Robillard <http://drobilla.net>
* Copyright (C) 2000-2008 Paul Davis
*
* Evoral is free software; you can redistribute it and/or modify it under the
#include <stdint.h>
#include <boost/shared_ptr.hpp>
+#include "evoral/visibility.h"
+
namespace Evoral {
* This class defines a < operator which is a strict weak ordering, so
* Parameter may be stored in a std::set, used as a std::map key, etc.
*/
-class Parameter
+class LIBEVORAL_API Parameter
{
public:
Parameter(uint32_t type, uint8_t channel=0, uint32_t id=0)
/** Not used in indentity/comparison */
struct Metadata {
- Metadata(double low=0.0, double high=1.0, double mid=0.0, bool tog=false)
- : min(low), max(high), normal(mid), toggled(tog)
+ Metadata(double low=0.0, double high=1.0, double mid=0.0, bool tog=false)
+ : min(low), max(high), normal(mid), toggled(tog)
{}
double min;
double max;
double normal;
- bool toggled;
+ bool toggled;
};
- inline static void set_range(uint32_t type, double min, double max, double normal, bool toggled) {
+ inline static void set_range(uint32_t type, double min, double max, double normal, bool toggled) {
_type_metadata[type] = Metadata(min, max, normal, toggled);
}
- inline void set_range(double min, double max, double normal, bool toggled) {
- _metadata = boost::shared_ptr<Metadata>(new Metadata(min, max, normal, toggled));
+ inline void set_range(double min, double max, double normal, bool toggled) {
+ _metadata = boost::shared_ptr<Metadata>(new Metadata(min, max, normal, toggled));
}
-
+
inline Metadata& metadata() const {
if (_metadata)
return *_metadata.get();