Audacity  3.0.3
Public Member Functions | Private Attributes | List of all members
EnvPoint Class Referencefinal

EnvPoint, derived from XMLTagHandler, provides Envelope with a draggable point type. More...

#include <Envelope.h>

Inheritance diagram for EnvPoint:
[legend]
Collaboration diagram for EnvPoint:
[legend]

Public Member Functions

 EnvPoint ()
 
 EnvPoint (double t, double val)
 
double GetT () const
 
void SetT (double t)
 
double GetVal () const
 
void SetVal (Envelope *pEnvelope, double val)
 
bool HandleXMLTag (const wxChar *tag, const wxChar **attrs) override
 
XMLTagHandlerHandleXMLChild (const wxChar *WXUNUSED(tag)) override
 
- Public Member Functions inherited from XMLTagHandler
 XMLTagHandler ()
 
virtual ~XMLTagHandler ()
 
virtual void HandleXMLEndTag (const wxChar *WXUNUSED(tag))
 
virtual void HandleXMLContent (const wxString &WXUNUSED(content))
 
virtual XMLTagHandlerHandleXMLChild (const wxChar *tag)=0
 
bool ReadXMLTag (const char *tag, const char **attrs)
 
void ReadXMLEndTag (const char *tag)
 
void ReadXMLContent (const char *s, int len)
 
XMLTagHandlerReadXMLChild (const char *tag)
 

Private Attributes

double mT {}
 
double mVal {}
 

Detailed Description

EnvPoint, derived from XMLTagHandler, provides Envelope with a draggable point type.

Definition at line 29 of file Envelope.h.

Constructor & Destructor Documentation

◆ EnvPoint() [1/2]

EnvPoint::EnvPoint ( )
inline

Definition at line 32 of file Envelope.h.

32 {}

◆ EnvPoint() [2/2]

EnvPoint::EnvPoint ( double  t,
double  val 
)
inline

Definition at line 33 of file Envelope.h.

33 : mT{ t }, mVal{ val } {}

Member Function Documentation

◆ GetT()

double EnvPoint::GetT ( ) const
inline

Definition at line 35 of file Envelope.h.

35 { return mT; }

References mT.

Referenced by Envelope::CopyRange(), Envelope::EqualRange(), Envelope::RemoveUnneededPoints(), and Envelope::WriteXML().

Here is the caller graph for this function:

◆ GetVal()

double EnvPoint::GetVal ( ) const
inline

Definition at line 37 of file Envelope.h.

37 { return mVal; }

References mVal.

Referenced by Envelope::CopyRange(), Envelope::RemoveUnneededPoints(), and Envelope::WriteXML().

Here is the caller graph for this function:

◆ HandleXMLChild()

XMLTagHandler* EnvPoint::HandleXMLChild ( const wxChar *  WXUNUSEDtag)
inlineoverride

Definition at line 57 of file Envelope.h.

58  {
59  return NULL;
60  }

◆ HandleXMLTag()

bool EnvPoint::HandleXMLTag ( const wxChar *  tag,
const wxChar **  attrs 
)
inlineoverridevirtual

Implements XMLTagHandler.

Definition at line 40 of file Envelope.h.

41  {
42  if (!wxStrcmp(tag, wxT("controlpoint"))) {
43  while (*attrs) {
44  const wxChar *attr = *attrs++;
45  const wxChar *value = *attrs++;
46  if (!wxStrcmp(attr, wxT("t")))
48  else if (!wxStrcmp(attr, wxT("val")))
49  SetVal( nullptr, Internat::CompatibleToDouble(value) );
50  }
51  return true;
52  }
53  else
54  return false;
55  }

References Internat::CompatibleToDouble(), SetT(), and SetVal().

Here is the call graph for this function:

◆ SetT()

void EnvPoint::SetT ( double  t)
inline

Definition at line 36 of file Envelope.h.

36 { mT = t; }

References mT.

Referenced by HandleXMLTag(), and Envelope::MoveDragPoint().

Here is the caller graph for this function:

◆ SetVal()

void EnvPoint::SetVal ( Envelope pEnvelope,
double  val 
)
inline

Definition at line 266 of file Envelope.h.

267 {
268  if ( pEnvelope )
269  val = pEnvelope->ClampValue(val);
270  mVal = val;
271 }

References Envelope::ClampValue(), and mVal.

Referenced by HandleXMLTag(), and Envelope::MoveDragPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mT

double EnvPoint::mT {}
private

Definition at line 63 of file Envelope.h.

Referenced by GetT(), and SetT().

◆ mVal

double EnvPoint::mVal {}
private

Definition at line 64 of file Envelope.h.

Referenced by GetVal(), and SetVal().


The documentation for this class was generated from the following file:
EnvPoint::SetT
void SetT(double t)
Definition: Envelope.h:36
EnvPoint::SetVal
void SetVal(Envelope *pEnvelope, double val)
Definition: Envelope.h:266
EnvPoint::mT
double mT
Definition: Envelope.h:63
Envelope::ClampValue
double ClampValue(double value)
Definition: Envelope.h:110
EnvPoint::mVal
double mVal
Definition: Envelope.h:64
Internat::CompatibleToDouble
static bool CompatibleToDouble(const wxString &stringToConvert, double *result)
Convert a string to a number.
Definition: Internat.cpp:134