UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
ZqbNatGroup Class Reference

#include <zqb_natgroup.hpp>

Inheritance diagram for ZqbNatGroup:
ZqbAutoName ZqbAutoName ZqbName ZqbName ZqbName ZqbName

Classes

struct  Tick
 

Public Types

typedef std::vector< TickTicks
 
typedef std::vector< TickTicks
 

Public Member Functions

 ZqbNatGroup (const char *szName=NULL)
 
virtual void getCoords (double c[2]) const
 
virtual bool setCoords (double c[2], bool bForce=false)
 
bool setCoordsSameOrder (double c[2], bool bForce=false)
 
bool setCoords (double c1, double c2, bool bForce=false)
 
bool setCoordsSameOrder (double c1, double c2, bool bForce=false)
 
bool isVisible (double c) const
 
virtual void zoomAll ()
 
virtual void unifyBounds ()
 
virtual void unsetBounds ()
 
virtual void setBounds (double b[2])
 
void setBounds (double b1, double b2)
 
virtual bool getBounds (double b[2]=NULL) const
 
virtual void setAutoTickMode (bool bAuto)
 
virtual bool getAutoTickMode () const
 
virtual void setMainTickStep (double fStep)
 
virtual double getMainTickStep () const
 
virtual int getMainTickPrec () const
 
virtual void setSubTickFreq (int nTicks)
 
virtual int getSubTickFreq () const
 
virtual void calcTicks (Ticks &ticks) const
 
virtual double calcMainTickStep (int *pMainTicksPrec=NULL) const
 
virtual bool n2p (ZqbPixGroup &pg, double nc, int &pc)
 
virtual bool p2n (ZqbPixGroup &pg, int pc, double &nc)
 
virtual bool isEmpty ()
 
 ZqbNatGroup (const char *szName=NULL)
 
virtual void getCoords (double c[2]) const
 
virtual bool setCoords (double c[2], bool bForce=false)
 
bool setCoordsSameOrder (double c[2], bool bForce=false)
 
bool setCoords (double c1, double c2, bool bForce=false)
 
bool setCoordsSameOrder (double c1, double c2, bool bForce=false)
 
bool isVisible (double c) const
 
virtual void zoomAll ()
 
virtual void unifyBounds ()
 
virtual void unsetBounds ()
 
virtual void setBounds (double b[2])
 
void setBounds (double b1, double b2)
 
virtual bool getBounds (double b[2]=NULL) const
 
virtual void setAutoTickMode (bool bAuto)
 
virtual bool getAutoTickMode () const
 
virtual void setMainTickStep (double fStep)
 
virtual double getMainTickStep () const
 
virtual int getMainTickPrec () const
 
virtual void setSubTickFreq (int nTicks)
 
virtual int getSubTickFreq () const
 
virtual void calcTicks (Ticks &ticks) const
 
virtual double calcMainTickStep (int *pMainTicksPrec=NULL) const
 
virtual bool n2p (ZqbPixGroup &pg, double nc, int &pc)
 
virtual bool p2n (ZqbPixGroup &pg, int pc, double &nc)
 
virtual bool isEmpty ()
 
- Public Member Functions inherited from ZqbAutoName
 ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL)
 
virtual ~ZqbAutoName ()
 
 ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL)
 
virtual ~ZqbAutoName ()
 
- Public Member Functions inherited from ZqbName
 ZqbName (const char *szRoot, const char *szCustomName=NULL)
 
 ZqbName (const ZqbName &name)
 
virtual ~ZqbName ()
 
ZqbNameoperator= (const ZqbName &name)
 
virtual const char * getName () const
 
virtual const char * getType () const
 
bool hasName (const char *szString) const
 
 ZqbName (const char *szRoot, const char *szCustomName=NULL)
 
 ZqbName (const ZqbName &name)
 
virtual ~ZqbName ()
 
ZqbNameoperator= (const ZqbName &name)
 
virtual const char * getName () const
 
virtual const char * getType () const
 
bool hasName (const char *szString) const
 

Protected Member Functions

virtual bool addMember (ZqbNatGrpMember *pMember)
 
virtual bool removeMember (ZqbNatGrpMember *pMember)
 
virtual bool addMember (ZqbNatGrpMember *pMember)
 
virtual bool removeMember (ZqbNatGrpMember *pMember)
 

Protected Attributes

ZqbNatGrpMembers m_Members
 
bool m_bKnownBounds
 
double m_fBounds [2]
 
double m_fCoords [2]
 
bool m_bAutoCalcFreq
 
double m_fMainTicksStep
 
int m_nMainTicksPrec
 
int m_nSubTicks
 
- Protected Attributes inherited from ZqbName
char * m_szName
 
char * m_szRoot
 

Friends

class ZqbNatGrpMember
 

Detailed Description

Natural group represents abstraction for application specific coordinate such as depth, coordinate, velocity etc.

Class implements next concepts:

Member Typedef Documentation

typedef std::vector<Tick> ZqbNatGroup::Ticks

Array of ticks.

typedef std::vector<Tick> ZqbNatGroup::Ticks

Array of ticks.

Constructor & Destructor Documentation

ZqbNatGroup::ZqbNatGroup ( const char *  szName = NULL)

Create natural group object. It's supposed that natural group will exist longer than all its members.

ZqbNatGroup::ZqbNatGroup ( const char *  szName = NULL)

Create natural group object. It's supposed that natural group will exist longer than all its members.

Member Function Documentation

virtual bool ZqbNatGroup::addMember ( ZqbNatGrpMember pMember)
protectedvirtual

Add new member to the group. Return true on success and false if such member already exist.

virtual bool ZqbNatGroup::addMember ( ZqbNatGrpMember pMember)
protectedvirtual

Add new member to the group. Return true on success and false if such member already exist.

virtual double ZqbNatGroup::calcMainTickStep ( int *  pMainTicksPrec = NULL) const
virtual

Automatically calculate main ticks step and optionally precision of main ticks floating point representation.

virtual double ZqbNatGroup::calcMainTickStep ( int *  pMainTicksPrec = NULL) const
virtual

Automatically calculate main ticks step and optionally precision of main ticks floating point representation.

virtual void ZqbNatGroup::calcTicks ( Ticks ticks) const
virtual

Return array of ticks according to current coordinates, main and secondary ticks frequencies.

virtual void ZqbNatGroup::calcTicks ( Ticks ticks) const
virtual

Return array of ticks according to current coordinates, main and secondary ticks frequencies.

virtual bool ZqbNatGroup::getAutoTickMode ( ) const
virtual

Get flag of automatic main ticks frequency calculation.

virtual bool ZqbNatGroup::getAutoTickMode ( ) const
virtual

Get flag of automatic main ticks frequency calculation.

virtual bool ZqbNatGroup::getBounds ( double  b[2] = NULL) const
virtual

Return true if group has bounds (at least one member should have bounds in this case). In case of absence of bounds false is returned and current coordinates are assigned to output b[].

virtual bool ZqbNatGroup::getBounds ( double  b[2] = NULL) const
virtual

Return true if group has bounds (at least one member should have bounds in this case). In case of absence of bounds false is returned and current coordinates are assigned to output b[].

virtual void ZqbNatGroup::getCoords ( double  c[2]) const
virtual

Get coordinate range. Order of coordinates in the pair is important! First item is for less pixel coordinate and the second is for bigger pixel coordinate.

virtual void ZqbNatGroup::getCoords ( double  c[2]) const
virtual

Get coordinate range. Order of coordinates in the pair is important! First item is for less pixel coordinate and the second is for bigger pixel coordinate.

virtual int ZqbNatGroup::getMainTickPrec ( ) const
virtual

Get automatically calculated precision for main ticks. It's number of digits after decimal dot in floating number representation.

virtual int ZqbNatGroup::getMainTickPrec ( ) const
virtual

Get automatically calculated precision for main ticks. It's number of digits after decimal dot in floating number representation.

virtual double ZqbNatGroup::getMainTickStep ( ) const
virtual

Get current frequency of main ticks.

virtual double ZqbNatGroup::getMainTickStep ( ) const
virtual

Get current frequency of main ticks.

virtual int ZqbNatGroup::getSubTickFreq ( ) const
virtual

Get number of secondary ticks between main ones.

virtual int ZqbNatGroup::getSubTickFreq ( ) const
virtual

Get number of secondary ticks between main ones.

virtual bool ZqbNatGroup::isEmpty ( )
virtual

Return true if group is empty (no members is in it).

virtual bool ZqbNatGroup::isEmpty ( )
virtual

Return true if group is empty (no members is in it).

bool ZqbNatGroup::isVisible ( double  c) const
inline

Check whether given coordinate is visible.

bool ZqbNatGroup::isVisible ( double  c) const
inline

Check whether given coordinate is visible.

virtual bool ZqbNatGroup::n2p ( ZqbPixGroup pg,
double  nc,
int &  pc 
)
virtual

Convert natural coordinate into pixel one in given pixel group. Performs linear convertion that means each pixel has the same natural weight. Return true in success and false if convertion failed.

virtual bool ZqbNatGroup::n2p ( ZqbPixGroup pg,
double  nc,
int &  pc 
)
virtual

Convert natural coordinate into pixel one in given pixel group. Performs linear convertion that means each pixel has the same natural weight. Return true in success and false if convertion failed.

virtual bool ZqbNatGroup::p2n ( ZqbPixGroup pg,
int  pc,
double &  nc 
)
virtual

Convert pixel coordinate into natural one in given pixel group. Performs linear convertion that means each pixel has the same natural weight. Return true in success and false if convertion failed.

virtual bool ZqbNatGroup::p2n ( ZqbPixGroup pg,
int  pc,
double &  nc 
)
virtual

Convert pixel coordinate into natural one in given pixel group. Performs linear convertion that means each pixel has the same natural weight. Return true in success and false if convertion failed.

virtual bool ZqbNatGroup::removeMember ( ZqbNatGrpMember pMember)
protectedvirtual

Remove member from the group. Return true on success and false if member is not found. It's dangerous to call this method in case the member object will continue to live!

virtual bool ZqbNatGroup::removeMember ( ZqbNatGrpMember pMember)
protectedvirtual

Remove member from the group. Return true on success and false if member is not found. It's dangerous to call this method in case the member object will continue to live!

virtual void ZqbNatGroup::setAutoTickMode ( bool  bAuto)
virtual

Set flag of automatic main ticks frequency calculation.

virtual void ZqbNatGroup::setAutoTickMode ( bool  bAuto)
virtual

Set flag of automatic main ticks frequency calculation.

virtual void ZqbNatGroup::setBounds ( double  b[2])
virtual

Set bounds of the group.

virtual void ZqbNatGroup::setBounds ( double  b[2])
virtual

Set bounds of the group.

void ZqbNatGroup::setBounds ( double  b1,
double  b2 
)
inline

Set bounds of the group. Calls setBounds(double[2]) method.

void ZqbNatGroup::setBounds ( double  b1,
double  b2 
)
inline

Set bounds of the group. Calls setBounds(double[2]) method.

virtual bool ZqbNatGroup::setCoords ( double  c[2],
bool  bForce = false 
)
virtual

Set new coordinate range. Order of coordinates in the pair is important! First item is for less pixel coordinate and the second is for bigger pixel coordinate. Returns true if coordinates are really changed and false if passed coordinates are the same as in the group.

All members will be informed about coordinate change even if the coordinates are the same in case of bForce is set.

virtual bool ZqbNatGroup::setCoords ( double  c[2],
bool  bForce = false 
)
virtual

Set new coordinate range. Order of coordinates in the pair is important! First item is for less pixel coordinate and the second is for bigger pixel coordinate. Returns true if coordinates are really changed and false if passed coordinates are the same as in the group.

All members will be informed about coordinate change even if the coordinates are the same in case of bForce is set.

bool ZqbNatGroup::setCoords ( double  c1,
double  c2,
bool  bForce = false 
)
inline

Set new coordinate range. Order of coordinates in the pair is important! First item is for less pixel coordinate and the second is for bigger pixel coordinate. Calls setCoords(double[2]) method. Returns true if coordinates are really changed and false if passed coordinates are the same as in the group.

All members will be informed about coordinate change even if the coordinates are the same in case of bForce is set.

bool ZqbNatGroup::setCoords ( double  c1,
double  c2,
bool  bForce = false 
)
inline

Set new coordinate range. Order of coordinates in the pair is important! First item is for less pixel coordinate and the second is for bigger pixel coordinate. Calls setCoords(double[2]) method. Returns true if coordinates are really changed and false if passed coordinates are the same as in the group.

All members will be informed about coordinate change even if the coordinates are the same in case of bForce is set.

bool ZqbNatGroup::setCoordsSameOrder ( double  c[2],
bool  bForce = false 
)
inline

Set new coordinates like setCoords() method but order of c[0],c[1] will be the same as of previous coordinates.

bool ZqbNatGroup::setCoordsSameOrder ( double  c[2],
bool  bForce = false 
)
inline

Set new coordinates like setCoords() method but order of c[0],c[1] will be the same as of previous coordinates.

bool ZqbNatGroup::setCoordsSameOrder ( double  c1,
double  c2,
bool  bForce = false 
)
inline

Set new coordinates like setCoords() method but order of c1,c2 will be the same as of previous coordinates.

bool ZqbNatGroup::setCoordsSameOrder ( double  c1,
double  c2,
bool  bForce = false 
)
inline

Set new coordinates like setCoords() method but order of c1,c2 will be the same as of previous coordinates.

virtual void ZqbNatGroup::setMainTickStep ( double  fStep)
virtual

Set main ticks frequency. Stored value will be forgotten if automatic ticks calculation is turned on.

virtual void ZqbNatGroup::setMainTickStep ( double  fStep)
virtual

Set main ticks frequency. Stored value will be forgotten if automatic ticks calculation is turned on.

virtual void ZqbNatGroup::setSubTickFreq ( int  nTicks)
virtual

Set number of secondary ticks between main ones.

virtual void ZqbNatGroup::setSubTickFreq ( int  nTicks)
virtual

Set number of secondary ticks between main ones.

virtual void ZqbNatGroup::unifyBounds ( )
virtual

Unify all member bounds into group ones. The method is called each time when member changes his bounds so usually there is no reason to call it in application.

For two members with bounds [b1,b2] (b1<b2)) and [b3,b4] (b3<b4) result depends on mutual comparision results:

  • if b3<b2 then resulting group bounds should be [b1,b4];
  • if b2<b3 then resulting group bounds should be [b1,b4];
  • if b4<b1 then resulting group bounds should be [b3,b2].
virtual void ZqbNatGroup::unifyBounds ( )
virtual

Unify all member bounds into group ones. The method is called each time when member changes his bounds so usually there is no reason to call it in application.

For two members with bounds [b1,b2] (b1<b2)) and [b3,b4] (b3<b4) result depends on mutual comparision results:

  • if b3<b2 then resulting group bounds should be [b1,b4];
  • if b2<b3 then resulting group bounds should be [b1,b4];
  • if b4<b1 then resulting group bounds should be [b3,b2].
virtual void ZqbNatGroup::unsetBounds ( )
virtual

Unset flag of knowning own bounds.

virtual void ZqbNatGroup::unsetBounds ( )
virtual

Unset flag of knowning own bounds.

virtual void ZqbNatGroup::zoomAll ( )
virtual

Set maximum coordinate range (from bounds) saving original direction of the coordinates. If bounds are unknown then do nothing.

virtual void ZqbNatGroup::zoomAll ( )
virtual

Set maximum coordinate range (from bounds) saving original direction of the coordinates. If bounds are unknown then do nothing.

Member Data Documentation

bool ZqbNatGroup::m_bAutoCalcFreq
protected

Flag of automatic main ticks frequency calculation.

bool ZqbNatGroup::m_bKnownBounds
protected

Flag of knowing own bounds. In case of true m_fBounds field has meaningful values otherwise it is undefined.

double ZqbNatGroup::m_fBounds
protected

Own bounds of this natural group memeber.

double ZqbNatGroup::m_fCoords
protected

Coordinates of the group.

double ZqbNatGroup::m_fMainTicksStep
protected

Main ticks step. Usually main ticks are labeled. Negative value means the ticks frequency is undefined.

ZqbNatGrpMembers ZqbNatGroup::m_Members
protected

List of netural group members.

List of natural group members.

int ZqbNatGroup::m_nMainTicksPrec
protected

Main ticks representation precision. Used for label text composition by means of "%f" format.

int ZqbNatGroup::m_nSubTicks
protected

Secondary subdivision of main ticks: number of small notches between main labels. 0 means this feature is off. 1 means subdivision by two subranges, 2 means three subranges and so on.


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