Chemical Data Processing Library C++ API - Version 1.1.1
Public Member Functions | List of all members
CDPL::Vis::SizeSpecification Class Reference

Specifies the value and type of a size attribute and defines how the value may change during processing steps. More...

#include <SizeSpecification.hpp>

Public Member Functions

 SizeSpecification (double value=0.0, bool relative=false, bool input_scaling=false, bool output_scaling=false)
 Constructs a SizeSpecification object with the given attributes. More...
 
void setValue (double value)
 Sets value of the specified size. More...
 
double getValue () const
 Returns the value of the specified size. More...
 
void setRelative (bool relative)
 Specifies if the size specification is absolute or relative to another size. More...
 
bool isRelative () const
 Tells if the size specification is absolute or relative to another size. More...
 
void followInputScaling (bool follow)
 Specifies whether the specified size has to follow input scaling operations. More...
 
bool followsInputScaling () const
 Tells if the specified size follows input scaling operations. More...
 
void followOutputScaling (bool follow)
 Specifies whether the specified size has to follow output scaling operations. More...
 
bool followsOutputScaling () const
 Tells if the specified size follows output scaling operations. More...
 
bool operator== (const SizeSpecification &spec) const
 Equality comparison operator. More...
 
bool operator!= (const SizeSpecification &spec) const
 Inequality comparison operator. More...
 

Detailed Description

Specifies the value and type of a size attribute and defines how the value may change during processing steps.

Constructor & Destructor Documentation

◆ SizeSpecification()

CDPL::Vis::SizeSpecification::SizeSpecification ( double  value = 0.0,
bool  relative = false,
bool  input_scaling = false,
bool  output_scaling = false 
)
inline

Constructs a SizeSpecification object with the given attributes.

Parameters
valueThe value of the specified size.
relativetrue if the size specification is relative (proportional) to another size, and false otherwise.
input_scalingtrue if the specified size has to follow input scaling, and false otherwise.
output_scalingtrue if the specified size has to follow output scaling, and false otherwise.
See also
setValue(), setRelative(), followInputScaling(), followOutputScaling()

Member Function Documentation

◆ setValue()

void CDPL::Vis::SizeSpecification::setValue ( double  value)

Sets value of the specified size.

Parameters
valueThe value of the specified size.

◆ getValue()

double CDPL::Vis::SizeSpecification::getValue ( ) const

Returns the value of the specified size.

Returns
The value of the specified size.
See also
setValue()

◆ setRelative()

void CDPL::Vis::SizeSpecification::setRelative ( bool  relative)

Specifies if the size specification is absolute or relative to another size.

If the size specification is relative (proportional) to another size, the size value is interpreted as a scaling factor for the absolute value of the other size.

Parameters
relativetrue if the size specification is relative, and false otherwise.
See also
setValue()

◆ isRelative()

bool CDPL::Vis::SizeSpecification::isRelative ( ) const

Tells if the size specification is absolute or relative to another size.

Returns
true if the size specification is relative, and false otherwise.
See also
setRelative()

◆ followInputScaling()

void CDPL::Vis::SizeSpecification::followInputScaling ( bool  follow)

Specifies whether the specified size has to follow input scaling operations.

Input scaling is a pre-processing step (performed by some other part of the system) where an input size quantity is scaled to fulfill a certain constraint. An example is the scaling of input atom coordinates to obtain a certain average bond length for the 2D depiction of a chemical structure or reaction.

Parameters
followtrue if the specified size has to follow input scaling operations, and false otherwise.

◆ followsInputScaling()

bool CDPL::Vis::SizeSpecification::followsInputScaling ( ) const

Tells if the specified size follows input scaling operations.

Returns
true if the specified size follows input scaling operations, and false otherwise.
See also
followInputScaling()

◆ followOutputScaling()

void CDPL::Vis::SizeSpecification::followOutputScaling ( bool  follow)

Specifies whether the specified size has to follow output scaling operations.

Output scaling is a post-processing step (performed by some other part of the system) where an output size quantity is scaled to fulfill a certain constraint. An example is the scaling of output atom coordinates to fit the 2D depiction of a chemical structure or reaction into the viewport area.

Parameters
followtrue if the specified size has to follow output scaling operations, and false otherwise.

◆ followsOutputScaling()

bool CDPL::Vis::SizeSpecification::followsOutputScaling ( ) const

Tells if the specified size follows output scaling operations.

Returns
true if the specified size follows output scaling operations, and false otherwise.
See also
followOutputScaling()

◆ operator==()

bool CDPL::Vis::SizeSpecification::operator== ( const SizeSpecification spec) const

Equality comparison operator.

Parameters
specThe other SizeSpecification object to be compared with.
Returns
true if all attributes compare equal, and false otherwise.

◆ operator!=()

bool CDPL::Vis::SizeSpecification::operator!= ( const SizeSpecification spec) const

Inequality comparison operator.

The result is equivalent to !(*this == spec).

Parameters
specThe other SizeSpecification object to be compared with.
Returns
true if one of the attributes compares non-equal, and false otherwise.

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