Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
kome::objects::XYDataOperation Class Referenceabstract

xy data operation class More...

#include <XYDataOperation.h>

Inheritance diagram for kome::objects::XYDataOperation:
Inheritance graph
[legend]

Public Member Functions

 XYDataOperation ()
 constructor
 
virtual ~XYDataOperation ()
 destructor
 
void setName (const char *name)
 sets name More...
 
const char * getName ()
 gets name More...
 
void setIndex (int index)
 set index More...
 
int getIndex ()
 get index More...
 
void update (kome::core::XYData &src, kome::core::XYData &dst, Chromatogram &chrom)
 updates xy data More...
 
void update (kome::core::XYData &src, kome::core::XYData &dst, Spectrum &spec)
 updates xy data More...
 
void update (kome::core::XYData &src, kome::core::XYData &dst, Sample &sample)
 updates xy data More...
 

Protected Member Functions

virtual void onUpdate (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Chromatogram &chrom)=0
 This method is called by update method. (abstract method) More...
 
virtual void onUpdate (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Spectrum &spec)=0
 This method is called by update method. (abstract method) More...
 
virtual void onUpdate (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Sample &sample)=0
 This method is called by update method. (abstract method) More...
 

Protected Attributes

std::string m_name
 
int m_index
 

Detailed Description

xy data operation class

Definition at line 31 of file XYDataOperation.h.

Member Function Documentation

int kome::objects::XYDataOperation::getIndex ( )

get index

Returns
operation index

Definition at line 51 of file XYDataOperation.cpp.

51  {
52  return m_index;
53 }
const char * kome::objects::XYDataOperation::getName ( )

gets name

Returns
name

Definition at line 41 of file XYDataOperation.cpp.

41  {
42  return m_name.c_str();
43 }
void kome::objects::XYDataOperation::onUpdate ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Chromatogram chrom 
)
protectedpure virtual

This method is called by update method. (abstract method)

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]chromchromatogram

Implemented in kome::operation::MzRangeFilter, kome::operation::BaselineSubtract, kome::operation::Normalization, and kome::operation::Filter.

void kome::objects::XYDataOperation::onUpdate ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Spectrum spec 
)
protectedpure virtual

This method is called by update method. (abstract method)

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]specspectrum

Implemented in kome::operation::MzRangeFilter, kome::operation::BaselineSubtract, kome::operation::Normalization, and kome::operation::Filter.

void kome::objects::XYDataOperation::onUpdate ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Sample sample 
)
protectedpure virtual

This method is called by update method. (abstract method)

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]samplesample

Implemented in kome::operation::MzRangeFilter, kome::operation::BaselineSubtract, kome::operation::Normalization, and kome::operation::Filter.

void kome::objects::XYDataOperation::setIndex ( int  index)

set index

Parameters
[in]indexoperation index

Definition at line 46 of file XYDataOperation.cpp.

46  {
47  m_index = index;
48 }
void kome::objects::XYDataOperation::setName ( const char *  name)

sets name

Parameters
[in]namename

Definition at line 36 of file XYDataOperation.cpp.

36  {
37  m_name = NVL( name, "" );
38 }
#define NVL(checkVal, replaceVal)
Definition: CoreMacros.h:99
void kome::objects::XYDataOperation::update ( kome::core::XYData src,
kome::core::XYData dst,
Chromatogram chrom 
)

updates xy data

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]chromchromatogram

Definition at line 76 of file XYDataOperation.cpp.

80  {
81  // copy
83  pt.reserve( src.getLength() );
84  for( unsigned int i = 0; i < src.getLength(); i++ ) {
85  pt.addPoint( src.getX( i ), src.getY( i ) );
86  }
87 
88  // clear
89  dst.clearPoints();
90 
91  // update
92  onUpdate( pt, dst, chrom );
93 }
data points data of profile management class
Definition: DataPoints.h:25
double getX(const unsigned int index)
gets x coordinate
Definition: XYData.cpp:224
void clearPoints()
clear all data points
Definition: XYData.cpp:137
double getY(const unsigned int index)
gets y coordinate
Definition: XYData.cpp:243
virtual void onUpdate(kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Chromatogram &chrom)=0
This method is called by update method. (abstract method)
void reserve(const unsigned int num)
reserves enough contiguous memory of array
Definition: XYData.cpp:262
void addPoint(const double x, const double y)
adds point
Definition: XYData.cpp:149
unsigned int getLength()
gets the number of points @return the number of points
Definition: XYData.cpp:216

Here is the call graph for this function:

void kome::objects::XYDataOperation::update ( kome::core::XYData src,
kome::core::XYData dst,
Spectrum spec 
)

updates xy data

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]specspectrum

Definition at line 56 of file XYDataOperation.cpp.

60  {
61  // copy
63  pt.reserve( src.getLength() );
64  for( unsigned int i = 0; i < src.getLength(); i++ ) {
65  pt.addPoint( src.getX( i ), src.getY( i ) );
66  }
67 
68  // clear
69  dst.clearPoints();
70 
71  // update
72  onUpdate( pt, dst, spec );
73 }
data points data of profile management class
Definition: DataPoints.h:25
double getX(const unsigned int index)
gets x coordinate
Definition: XYData.cpp:224
void clearPoints()
clear all data points
Definition: XYData.cpp:137
double getY(const unsigned int index)
gets y coordinate
Definition: XYData.cpp:243
virtual void onUpdate(kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Chromatogram &chrom)=0
This method is called by update method. (abstract method)
void reserve(const unsigned int num)
reserves enough contiguous memory of array
Definition: XYData.cpp:262
void addPoint(const double x, const double y)
adds point
Definition: XYData.cpp:149
unsigned int getLength()
gets the number of points @return the number of points
Definition: XYData.cpp:216

Here is the call graph for this function:

void kome::objects::XYDataOperation::update ( kome::core::XYData src,
kome::core::XYData dst,
Sample sample 
)

updates xy data

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]samplesample

Definition at line 96 of file XYDataOperation.cpp.

100  {
101  // copy
103  pt.reserve( src.getLength() );
104  for( unsigned int i = 0; i < src.getLength(); i++ ) {
105  pt.addPoint( src.getX( i ), src.getY( i ) );
106  }
107 
108  // clear
109  dst.clearPoints();
110 
111  // update
112  onUpdate( pt, dst, sample );
113 }
data points data of profile management class
Definition: DataPoints.h:25
double getX(const unsigned int index)
gets x coordinate
Definition: XYData.cpp:224
void clearPoints()
clear all data points
Definition: XYData.cpp:137
double getY(const unsigned int index)
gets y coordinate
Definition: XYData.cpp:243
virtual void onUpdate(kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Chromatogram &chrom)=0
This method is called by update method. (abstract method)
void reserve(const unsigned int num)
reserves enough contiguous memory of array
Definition: XYData.cpp:262
void addPoint(const double x, const double y)
adds point
Definition: XYData.cpp:149
unsigned int getLength()
gets the number of points @return the number of points
Definition: XYData.cpp:216

Here is the call graph for this function:

Member Data Documentation

int kome::objects::XYDataOperation::m_index
protected

index

Definition at line 50 of file XYDataOperation.h.

std::string kome::objects::XYDataOperation::m_name
protected

name

Definition at line 47 of file XYDataOperation.h.


The documentation for this class was generated from the following files: