diff --git a/annotated.html b/annotated.html new file mode 100644 index 0000000..aba867b --- /dev/null +++ b/annotated.html @@ -0,0 +1,104 @@ + + +
+ + + + +
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
CCalculator | Advanced calculator with scientific and memory functions |
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
#include "calculator.h"
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <stdexcept>
#include <vector>
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
Advanced calculator with scientific and memory functions. + More...
+ +#include <calculator.h>
+Public Member Functions | |
Calculator () | |
Default constructor Initializes the calculator with default values. More... | |
double | add (double a, double b) |
double | subtract (double a, double b) |
double | multiply (double a, double b) |
double | divide (double a, double b) |
double | sqrt (double x) |
Calculate the square root of a number. More... | |
double | power (double base, double exp) |
Calculate the power of a number. More... | |
double | ln (double x) |
Calculate the natural logarithm. More... | |
double | sin (double x) |
Calculate sine in radians. More... | |
double | cos (double x) |
Calculate cosine in radians. More... | |
double | tan (double x) |
Calculate tangent in radians. More... | |
void | memoryStore () |
Store current value in memory. More... | |
double | memoryRecall () |
Recall value from memory. More... | |
void | memoryClear () |
Clear memory. More... | |
void | memoryAdd () |
Add current value to memory. More... | |
void | memorySubtract () |
Subtract current value from memory. More... | |
std::vector< std::string > | getHistory () const |
Get calculation history. More... | |
void | clearHistory () |
Clear calculation history. More... | |
std::string | getDisplayText () const |
void | appendNumber (char digit) |
void | setOperation (char op) |
void | calculate () |
void | clear () |
+Static Public Member Functions | |
static double | degreesToRadians (double degrees) |
Convert between degrees and radians. More... | |
static double | radiansToDegrees (double radians) |
Convert between radians and degrees. More... | |
+Private Member Functions | |
void | addToHistory (const std::string &entry) |
Add entry to calculation history. More... | |
std::string | formatNumber (double num) const |
Format number for display. More... | |
+Private Attributes | |
double | currentNumber |
Current input number. More... | |
double | storedNumber |
Previously stored number. More... | |
double | memoryValue |
Value stored in memory. More... | |
char | currentOperation |
Current operation to perform. More... | |
bool | newNumber |
Flag indicating start of new number input. More... | |
std::string | displayText |
Current display text. More... | |
bool | useRadians |
Flag for angle unit (true for radians, false for degrees) More... | |
std::vector< std::string > | history |
Calculation history. More... | |
Advanced calculator with scientific and memory functions.
+This class implements a professional calculator with both basic arithmetic and advanced scientific operations, including trigonometry, logarithms, and memory functions.
+Calculator::Calculator | +( | +) | ++ |
Default constructor Initializes the calculator with default values.
+ +double Calculator::add | +( | +double | +a, | +
+ | + | double | +b | +
+ | ) | ++ |
+
|
+ +private | +
Add entry to calculation history.
+entry | Calculation to add to history |
void Calculator::appendNumber | +( | +char | +digit | ) | ++ |
void Calculator::calculate | +( | +) | ++ |
void Calculator::clear | +( | +) | ++ |
void Calculator::clearHistory | +( | +) | ++ |
Clear calculation history.
+ +double Calculator::cos | +( | +double | +x | ) | ++ |
Calculate cosine in radians.
+x | Angle in radians |
+
|
+ +static | +
Convert between degrees and radians.
+degrees | Angle in degrees |
double Calculator::divide | +( | +double | +a, | +
+ | + | double | +b | +
+ | ) | ++ |
+
|
+ +private | +
Format number for display.
+num | Number to format |
std::string Calculator::getDisplayText | +( | +) | +const | +
std::vector< std::string > Calculator::getHistory | +( | +) | +const | +
Get calculation history.
+double Calculator::ln | +( | +double | +x | ) | ++ |
Calculate the natural logarithm.
+x | Input number |
std::domain_error | if x <= 0 |
void Calculator::memoryAdd | +( | +) | ++ |
Add current value to memory.
+void Calculator::memoryClear | +( | +) | ++ |
Clear memory.
+double Calculator::memoryRecall | +( | +) | ++ |
Recall value from memory.
+void Calculator::memoryStore | +( | +) | ++ |
Store current value in memory.
+void Calculator::memorySubtract | +( | +) | ++ |
Subtract current value from memory.
+double Calculator::multiply | +( | +double | +a, | +
+ | + | double | +b | +
+ | ) | ++ |
double Calculator::power | +( | +double | +base, | +
+ | + | double | +exp | +
+ | ) | ++ |
Calculate the power of a number.
+base | Base number |
exp | Exponent |
+
|
+ +static | +
Convert between radians and degrees.
+radians | Angle in radians |
void Calculator::setOperation | +( | +char | +op | ) | ++ |
double Calculator::sin | +( | +double | +x | ) | ++ |
Calculate sine in radians.
+x | Angle in radians |
double Calculator::sqrt | +( | +double | +x | ) | ++ |
Calculate the square root of a number.
+x | Input number |
std::domain_error | if x < 0 |
double Calculator::subtract | +( | +double | +a, | +
+ | + | double | +b | +
+ | ) | ++ |
double Calculator::tan | +( | +double | +x | ) | ++ |
Calculate tangent in radians.
+x | Angle in radians |
+
|
+ +private | +
Current input number.
+ +
+
|
+ +private | +
Current operation to perform.
+ +
+
|
+ +private | +
Current display text.
+ +
+
|
+ +private | +
Calculation history.
+ +
+
|
+ +private | +
Value stored in memory.
+ +
+
|
+ +private | +
Flag indicating start of new number input.
+ +
+
|
+ +private | +
Previously stored number.
+ +
+
|
+ +private | +
Flag for angle unit (true for radians, false for degrees)
+ +
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
Advanced Calculator Class Implementation. +More...
+#include <string>
#include <vector>
#include <cmath>
#include <memory>
#include <functional>
Go to the source code of this file.
++Data Structures | |
class | Calculator |
Advanced calculator with scientific and memory functions. More... | |
Advanced Calculator Class Implementation.
+ +
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
#include "calculator.h"
#include <iostream>
#include <iomanip>
#include <limits>
#include <string>
+Functions | |
void | displayMenu () |
void | displayHistory (const Calculator &calc) |
int | main () |
void displayHistory | +( | +const Calculator & | +calc | ) | ++ |
void displayMenu | +( | +) | ++ |
int main | +( | +) | ++ |
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
+Files | |
file | calculator.cpp |
file | calculator.h [code] |
Advanced Calculator Class Implementation. | |
file | main.cpp |
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
▼ src | |
calculator.cpp | |
calculator.h | Advanced Calculator Class Implementation |
main.cpp |
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+
This page explains how to interpret the graphs that are generated by doxygen.
+Consider the following example:
This will result in the following graph:
+The boxes in the above graph have the following meaning:
+The arrows have the following meaning:
+
+ Modern C++ Calculator
+ 1.0.0
+
+ A professional-grade calculator implementation in modern C++
+ |
+