mirror of
https://gitlab.com/rnger/amath
synced 2025-10-06 10:59:56 +00:00
184 lines
3.9 KiB
Groff
184 lines
3.9 KiB
Groff
.TH "Variable" 3 "Tue Jan 24 2017" "Version 1.6.2" "amath" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
Variable \- A user defined variable\&.
|
|
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
.PP
|
|
\fC#include <values\&.h>\fP
|
|
.SS "Public Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBVariable\fP (const char *\fBname\fP)"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fB~Variable\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "char * \fBGetName\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBNumber\fP * \fBGetValue\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBAssignValue\fP (\fBNumber\fP *\fBvalue\fP)"
|
|
.br
|
|
.in -1c
|
|
.SS "Public Attributes"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBVariable\fP * \fBNext\fP"
|
|
.br
|
|
.in -1c
|
|
.SS "Private Attributes"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "char * \fBname\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBNumber\fP * \fBvalue\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBbool\fP \fBchainDelete\fP"
|
|
.br
|
|
.in -1c
|
|
.SS "Friends"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBbool\fP \fBVariableList::Delete\fP (const char *\fBname\fP)"
|
|
.br
|
|
.in -1c
|
|
.SH "Detailed Description"
|
|
.PP
|
|
A user defined variable\&.
|
|
.PP
|
|
Definition at line 72 of file values\&.h\&.
|
|
.SH "Constructor & Destructor Documentation"
|
|
.PP
|
|
.SS "Variable::Variable (const char * name)"
|
|
|
|
.PP
|
|
Definition at line 42 of file values\&.cpp\&.
|
|
.PP
|
|
References AllocAndCopy(), chainDelete, name, Next, and value\&.
|
|
.PP
|
|
Referenced by VariableList::CreateVariable(), UserFunction::CreateVariable(), and UserFunction::UserFunction()\&.
|
|
.PP
|
|
.nf
|
|
43 {
|
|
44 AllocAndCopy(&this->name, name);
|
|
45 value = NOMEM;
|
|
46 Next = NOMEM;
|
|
47 chainDelete = true;
|
|
48 }
|
|
.fi
|
|
.SS "Variable::~Variable ()"
|
|
|
|
.PP
|
|
Definition at line 50 of file values\&.cpp\&.
|
|
.PP
|
|
References chainDelete, name, Next, and value\&.
|
|
.PP
|
|
.nf
|
|
51 {
|
|
52 delete [] name;
|
|
53
|
|
54 if (value != NOMEM) {
|
|
55 delete value;
|
|
56 }
|
|
57
|
|
58 if (chainDelete && Next != NOMEM) {
|
|
59 delete Next;
|
|
60 }
|
|
61 }
|
|
.fi
|
|
.SH "Member Function Documentation"
|
|
.PP
|
|
.SS "void Variable::AssignValue (\fBNumber\fP * value)"
|
|
|
|
.PP
|
|
Definition at line 73 of file values\&.cpp\&.
|
|
.PP
|
|
References Number::Clone(), and value\&.
|
|
.PP
|
|
Referenced by VariableNode::AssignValue(), UserFunctionNode::Evaluate(), and Grid::FunctionValue()\&.
|
|
.PP
|
|
.nf
|
|
74 {
|
|
75 if (this->value != NOMEM) {
|
|
76 delete this->value;
|
|
77 }
|
|
78
|
|
79 this->value = value->Clone();
|
|
80 }
|
|
.fi
|
|
.SS "char * Variable::GetName ()"
|
|
|
|
.PP
|
|
Definition at line 63 of file values\&.cpp\&.
|
|
.PP
|
|
References name\&.
|
|
.PP
|
|
Referenced by VariableList::CreateVariable(), FunctionList::Delete(), FunctionList::GetFunctionDef(), VariableNode::GetNodeText(), VariableNode::GetText(), VariableList::GetVariable(), UserFunction::InitializeTexts(), VariableList::ListContent(), and FunctionList::ListContent()\&.
|
|
.PP
|
|
.nf
|
|
64 {
|
|
65 return name;
|
|
66 }
|
|
.fi
|
|
.SS "\fBNumber\fP * Variable::GetValue ()"
|
|
|
|
.PP
|
|
Definition at line 68 of file values\&.cpp\&.
|
|
.PP
|
|
References Number::Clone(), and value\&.
|
|
.PP
|
|
Referenced by VariableNode::Evaluate(), and VariableList::ListContent()\&.
|
|
.PP
|
|
.nf
|
|
69 {
|
|
70 return value->Clone();;
|
|
71 }
|
|
.fi
|
|
.SH "Friends And Related Function Documentation"
|
|
.PP
|
|
.SS "\fBbool\fP \fBVariableList::Delete\fP (const char * name)\fC [friend]\fP"
|
|
|
|
.SH "Member Data Documentation"
|
|
.PP
|
|
.SS "\fBbool\fP Variable::chainDelete\fC [private]\fP"
|
|
|
|
.PP
|
|
Definition at line 86 of file values\&.h\&.
|
|
.PP
|
|
Referenced by VariableList::Delete(), Variable(), and ~Variable()\&.
|
|
.SS "char* Variable::name\fC [private]\fP"
|
|
|
|
.PP
|
|
Definition at line 84 of file values\&.h\&.
|
|
.PP
|
|
Referenced by GetName(), Variable(), and ~Variable()\&.
|
|
.SS "\fBVariable\fP* Variable::Next"
|
|
|
|
.PP
|
|
Definition at line 81 of file values\&.h\&.
|
|
.PP
|
|
Referenced by VariableList::CreateVariable(), VariableList::Delete(), VariableList::GetVariable(), VariableList::InsertTemporaryVariable(), VariableList::ListContent(), VariableList::RemoveTemporaryVariable(), Variable(), and ~Variable()\&.
|
|
.SS "\fBNumber\fP* Variable::value\fC [private]\fP"
|
|
|
|
.PP
|
|
Definition at line 85 of file values\&.h\&.
|
|
.PP
|
|
Referenced by AssignValue(), GetValue(), Variable(), and ~Variable()\&.
|
|
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for amath from the source code\&.
|