• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

Analitza

  • Analitza
  • Cn
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Analitza::Cn Class Reference
Analitza

#include <value.h>

Inheritance diagram for Analitza::Cn:
Inheritance graph
[legend]

Public Types

enum  ValueFormat { Char =8, Real =7, Integer =3, Boolean =1 }
 
- Public Types inherited from Analitza::Object
enum  ObjectType {
  none =0, value, variable, vector,
  list, apply, oper, container,
  matrix, matrixrow, custom
}
 

Public Member Functions

 Cn (const Cn &v)
 
 Cn (const double &b=0.)
 
 Cn (int i)
 
 Cn (uint i)
 
 Cn (bool b)
 
 Cn (const QChar &c)
 
virtual QVariant accept (AbstractExpressionVisitor *) const
 
QChar character () const
 
virtual Object * copy () const
 
ValueFormat format () const
 
int intValue () const
 
bool isBoolean () const
 
bool isCharacter () const
 
bool isInteger () const
 
bool isTrue () const
 
virtual bool isZero () const
 
virtual bool matches (const Object *exp, QMap< QString, const Object * > *found) const
 
bool operator< (const Cn &d) const
 
bool operator< (double d) const
 
bool operator<= (const Cn &d) const
 
bool operator<= (double d) const
 
Cn operator= (double d)
 
bool operator== (const Cn &d) const
 
double & rvalue ()
 
void setBoolean (bool b)
 
bool setValue (const QDomElement &e)
 
void setValue (const double &v)
 
void setValue (int v)
 
void setValue (uint v)
 
void setValue (bool v)
 
double value () const
 
- Public Member Functions inherited from Analitza::Object
virtual ~Object ()
 
bool isApply () const
 
bool isContainer () const
 
QString toString () const
 
enum ObjectType type () const
 

Static Public Member Functions

static Cn e ()
 
static Cn euler ()
 
static Cn pi ()
 

Additional Inherited Members

- Protected Member Functions inherited from Analitza::Object
 Object (enum ObjectType t)
 
- Protected Attributes inherited from Analitza::Object
const ObjectType m_type
 

Detailed Description

Cn is a value in MathML.

The Cn class is the one that represents a value in the expression trees.

Definition at line 42 of file value.h.

Member Enumeration Documentation

enum Analitza::Cn::ValueFormat
Enumerator
Char 
Real 
Integer 
Boolean 

Definition at line 45 of file value.h.

Constructor & Destructor Documentation

Analitza::Cn::Cn ( const Cn &  v)
inline

Copy constructor.

Creates a Cn from another one.

Definition at line 47 of file value.h.

Analitza::Cn::Cn ( const double &  b = 0.)
inlineexplicit

Constructor.

Creates a boolean value with b.

Definition at line 50 of file value.h.

Analitza::Cn::Cn ( int  i)
inlineexplicit

Constructor.

Creates an integer value with i.

Definition at line 53 of file value.h.

Analitza::Cn::Cn ( uint  i)
inlineexplicit

Definition at line 56 of file value.h.

Analitza::Cn::Cn ( bool  b)
inlineexplicit

Constructor.

Creates a boolean value with value b.

Definition at line 59 of file value.h.

Analitza::Cn::Cn ( const QChar &  c)
inlineexplicit

Constructor.

Creates a value that represents a character.

Definition at line 62 of file value.h.

Member Function Documentation

virtual QVariant Analitza::Cn::accept ( AbstractExpressionVisitor *  exp) const
virtual

Returns some string depending on the visior.

Implements Analitza::Object.

QChar Analitza::Cn::character ( ) const
inline

Definition at line 149 of file value.h.

virtual Object* Analitza::Cn::copy ( ) const
virtual
Returns
a new and equal instance of the tree.

Implements Analitza::Object.

static Cn Analitza::Cn::e ( )
static
static Cn Analitza::Cn::euler ( )
static
ValueFormat Analitza::Cn::format ( ) const
inline

Definition at line 99 of file value.h.

int Analitza::Cn::intValue ( ) const
inline
Returns
the value as an int.

Definition at line 87 of file value.h.

bool Analitza::Cn::isBoolean ( ) const
inline
Returns
whether it is a boolean value or not.

Definition at line 92 of file value.h.

bool Analitza::Cn::isCharacter ( ) const
inline
Returns
whether it is a character value or not.

Definition at line 97 of file value.h.

bool Analitza::Cn::isInteger ( ) const
inline
Returns
whether it is an integer value or not.

Definition at line 117 of file value.h.

bool Analitza::Cn::isTrue ( ) const
inline
Returns
If it is a boolean value, returns if it is true or not, otherwise retuns false.

Definition at line 109 of file value.h.

virtual bool Analitza::Cn::isZero ( ) const
inlinevirtual

Reimplemented from Analitza::Object.

Definition at line 152 of file value.h.

virtual bool Analitza::Cn::matches ( const Object *  exp,
QMap< QString, const Object * > *  found 
) const
virtual

exp is the tree that we will compare to, found is where we will pass the variables store the results.

It will return whether the object follows the pattern structure.

Implements Analitza::Object.

bool Analitza::Cn::operator< ( const Cn &  d) const
inline
Returns
whether d is less than this object.

Definition at line 127 of file value.h.

bool Analitza::Cn::operator< ( double  d) const
inline
Returns
whether d is less than this object's value.

Definition at line 132 of file value.h.

bool Analitza::Cn::operator<= ( const Cn &  d) const
inline
Returns
whether d is less or equal than this object.

Definition at line 137 of file value.h.

bool Analitza::Cn::operator<= ( double  d) const
inline
Returns
whether d is less or equal than this object's value.

Definition at line 142 of file value.h.

Cn Analitza::Cn::operator= ( double  d)
inline

Sets the new value to d.

Definition at line 147 of file value.h.

bool Analitza::Cn::operator== ( const Cn &  d) const
inline
Returns
whether d is equal than this object.

Definition at line 122 of file value.h.

static Cn Analitza::Cn::pi ( )
static
double& Analitza::Cn::rvalue ( )
inline

Definition at line 82 of file value.h.

void Analitza::Cn::setBoolean ( bool  b)
inline

Sets whether this value is boolean or not.

Definition at line 104 of file value.h.

bool Analitza::Cn::setValue ( const QDomElement &  e)

Extracts the number from the e Dom element and saves it.

void Analitza::Cn::setValue ( const double &  v)

Sets the new value of this function.

Parameters
vthe new value
void Analitza::Cn::setValue ( int  v)
void Analitza::Cn::setValue ( uint  v)
void Analitza::Cn::setValue ( bool  v)
double Analitza::Cn::value ( ) const
inline

Returns the value.

Definition at line 81 of file value.h.

Member Data Documentation

ushort Analitza::Cn::m_char

Definition at line 164 of file value.h.

double Analitza::Cn::m_value

Definition at line 164 of file value.h.


The documentation for this class was generated from the following file:
  • value.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Analitza

Skip menu "Analitza"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal