00001 // Emacs -*- C++ -*- 00002 #ifndef ANAPHE_AIDADATAPOINTSET 00003 #define ANAPHE_AIDADATAPOINTSET 1 00004 00005 #include "AIDA_Dev/IDevDataPointSet.h" 00006 #include <vector> 00007 00008 00009 namespace Anaphe { 00010 namespace AIDA_DataPointSet_native { 00011 00021 class AIDA_DataPointSet : virtual public AIDA::Dev::IDevDataPointSet 00022 { 00023 public: 00025 AIDA_DataPointSet( const std::string& title, 00026 int dimension, 00027 AIDA::IAnnotation* annotation ); 00029 AIDA_DataPointSet( const AIDA_DataPointSet& dps, 00030 AIDA::IAnnotation* annotation ); 00032 AIDA_DataPointSet( const AIDA::IDataPointSet& dps, 00033 AIDA::IAnnotation* annotation ); 00035 ~AIDA_DataPointSet(); 00036 00038 const std::string& name() const; 00039 00041 bool isUpToDate() const; 00042 void setUpToDate( bool isUpToDate ); 00043 bool setName( const std::string& newName ); 00044 const std::string& userLevelClassType() const; 00045 00047 AIDA::IAnnotation& annotation(); 00048 const AIDA::IAnnotation & annotation() const; 00049 const std::string& title() const; 00050 bool setTitle( const std::string & newTitle ); 00051 int dimension() const; 00052 void clear(); 00053 int size() const; 00054 AIDA::IDataPoint* point( int index ); 00055 const AIDA::IDataPoint* point( int index ) const; 00056 bool addPoint(); 00057 bool addPoint(const AIDA::IDataPoint & other); 00058 bool removePoint( int index ); 00059 double lowerExtent( int coordinate ) const; 00060 double upperExtent( int coordinate ) const; 00061 bool scale( double scaleFactor ); 00062 bool scaleValues( double scaleFactor ); 00063 bool scaleErrors( double scaleFactor ); 00064 00065 private: 00066 mutable AIDA::IAnnotation* m_annotation; 00067 int m_dimension; 00068 bool m_upToDate; 00069 std::vector< AIDA::IDataPoint* > m_dataPoints; 00070 00071 // Private methods 00072 void updateAnnotation() const; 00073 AIDA::IAnnotation* createAnnotation(); 00074 00075 // No assignment operator 00076 AIDA_DataPointSet& operator=( const AIDA_DataPointSet& ); 00077 }; 00078 00079 } 00080 } 00081 00082 00083 #endif /* ifndef ANAPHE_AIDADATAPOINTSET */