libqalculate-4.9.0
Public Member Functions | Public Attributes | List of all members
ExpressionName Struct Reference

A name for an expression item (function, variable or unit) More...

#include <ExpressionItem.h>

Public Member Functions

 ExpressionName ()
 
 ExpressionName (std::string sname)
 
void operator= (const ExpressionName &ename)
 
bool operator== (const ExpressionName &ename) const
 
bool operator!= (const ExpressionName &ename) const
 
int underscoreRemovalAllowed () const
 
std::string formattedName (int type, bool capitalize, bool html_suffix=false, int unicode_suffix=0, bool remove_typename=false, bool hide_underscore=false, bool *was_formatted=NULL, bool *was_capitalized=NULL) const
 

Public Attributes

bool abbreviation
 If the name is an abbreviation.
 
bool suffix
 If the name has a suffix. If set to true, the part of the name after an underscore should be treated as a suffix.
 
bool unicode
 If the name contains unicode characters.
 
bool plural
 If the name is in plural form.
 
bool reference
 If the name shall be used as a fixed reference. If this is set to true, the name will kept as it is in addition to translations of it.
 
bool avoid_input
 If the name is unsuitable for user input.
 
bool case_sensitive
 If the name is case sensitive. The default behavior is that abbreviations are case sensitive and other names are not.
 
bool completion_only
 Use only for completion (useful for unicode letter alternatives)
 
std::string name
 The name.
 

Detailed Description

A name for an expression item (function, variable or unit)

An expression name has a text string representing a name and boolean values describing the names properties.

Constructor & Destructor Documentation

◆ ExpressionName() [1/2]

ExpressionName::ExpressionName ( )

Create an empty expression name. All properties are set to false.

◆ ExpressionName() [2/2]

ExpressionName::ExpressionName ( std::string  sname)

Create an expression name. All properties are set to false, unless the name only has one character in which case abbreviation and case_sensitive is set to true.

Parameters
snameThe name.

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