Skip to content

Commit 7973427

Browse files
committed
Rename UnaryOperationNode to UnaryOperationNode.
1 parent 394062d commit 7973427

4 files changed

Lines changed: 36 additions & 36 deletions

File tree

Sources/BuiltInNodes/BI_BuiltInNodes.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
#include "BI_InputUINodes.hpp"
55
#include "BI_ViewerUINodes.hpp"
66
#include "BI_BinaryOperationNodes.hpp"
7-
#include "BI_UnaryFunctionNodes.hpp"
7+
#include "BI_UnaryOperationNodes.hpp"
88

99
#endif

Sources/BuiltInNodes/BI_UnaryFunctionNodes.cpp renamed to Sources/BuiltInNodes/BI_UnaryOperationNodes.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "BI_UnaryFunctionNodes.hpp"
1+
#include "BI_UnaryOperationNodes.hpp"
22
#include "NE_Localization.hpp"
33
#include "NUIE_NodeCommonParameters.hpp"
44

@@ -7,34 +7,34 @@
77
namespace BI
88
{
99

10-
SERIALIZATION_INFO (UnaryFunctionNode, 1);
10+
SERIALIZATION_INFO (UnaryOperationNode, 1);
1111
DYNAMIC_SERIALIZATION_INFO (AbsoluteNode, 1, "{125E8E5E-F1CB-4AE4-8EA9-53343ACD193B}");
1212
DYNAMIC_SERIALIZATION_INFO (CeilNode, 1, "{60B0DFF2-2718-46A1-B7D5-AA614BF21FDD}");
1313
DYNAMIC_SERIALIZATION_INFO (FloorNode, 1, "{0DB3D5E3-8B32-43A4-82D2-F5B816AB5CC1}");
1414

15-
UnaryFunctionNode::UnaryFunctionNode () :
16-
UnaryFunctionNode (NE::LocString (), NUIE::Point ())
15+
UnaryOperationNode::UnaryOperationNode () :
16+
UnaryOperationNode (NE::LocString (), NUIE::Point ())
1717
{
1818

1919
}
2020

21-
UnaryFunctionNode::UnaryFunctionNode (const NE::LocString& name, const NUIE::Point& position) :
21+
UnaryOperationNode::UnaryOperationNode (const NE::LocString& name, const NUIE::Point& position) :
2222
BasicUINode (name, position)
2323
{
2424
}
2525

26-
UnaryFunctionNode::~UnaryFunctionNode ()
26+
UnaryOperationNode::~UnaryOperationNode ()
2727
{
2828

2929
}
3030

31-
void UnaryFunctionNode::Initialize ()
31+
void UnaryOperationNode::Initialize ()
3232
{
3333
RegisterUIInputSlot (NUIE::UIInputSlotPtr (new NUIE::UIInputSlot (NE::SlotId ("a"), NE::LocString (L"A"), NE::ValuePtr (new NE::DoubleValue (0.0)), NE::OutputSlotConnectionMode::Single)));
3434
RegisterUIOutputSlot (NUIE::UIOutputSlotPtr (new NUIE::UIOutputSlot (NE::SlotId ("result"), NE::LocString (L"Result"))));
3535
}
3636

37-
NE::ValueConstPtr UnaryFunctionNode::Calculate (NE::EvaluationEnv& env) const
37+
NE::ValueConstPtr UnaryOperationNode::Calculate (NE::EvaluationEnv& env) const
3838
{
3939
NE::ValueConstPtr aValue = EvaluateInputSlot (NE::SlotId ("a"), env);
4040
if (!NE::IsComplexType<NE::NumberValue> (aValue)) {
@@ -60,32 +60,32 @@ NE::ValueConstPtr UnaryFunctionNode::Calculate (NE::EvaluationEnv& env) const
6060
}
6161
}
6262

63-
void UnaryFunctionNode::RegisterParameters (NUIE::NodeParameterList& parameterList) const
63+
void UnaryOperationNode::RegisterParameters (NUIE::NodeParameterList& parameterList) const
6464
{
6565
BasicUINode::RegisterParameters (parameterList);
66-
NUIE::RegisterSlotDefaultValueNodeParameter<UnaryFunctionNode, NE::DoubleValue> (parameterList, NE::SlotId ("a"), NE::LocString (L"A"), NUIE::ParameterType::Double);
66+
NUIE::RegisterSlotDefaultValueNodeParameter<UnaryOperationNode, NE::DoubleValue> (parameterList, NE::SlotId ("a"), NE::LocString (L"A"), NUIE::ParameterType::Double);
6767
}
6868

69-
bool UnaryFunctionNode::IsForceCalculated () const
69+
bool UnaryOperationNode::IsForceCalculated () const
7070
{
7171
return true;
7272
}
7373

74-
NE::Stream::Status UnaryFunctionNode::Read (NE::InputStream& inputStream)
74+
NE::Stream::Status UnaryOperationNode::Read (NE::InputStream& inputStream)
7575
{
7676
NE::ObjectHeader header (inputStream);
7777
BasicUINode::Read (inputStream);
7878
return inputStream.GetStatus ();
7979
}
8080

81-
NE::Stream::Status UnaryFunctionNode::Write (NE::OutputStream& outputStream) const
81+
NE::Stream::Status UnaryOperationNode::Write (NE::OutputStream& outputStream) const
8282
{
8383
NE::ObjectHeader header (outputStream, serializationInfo);
8484
BasicUINode::Write (outputStream);
8585
return outputStream.GetStatus ();
8686
}
8787

88-
NE::ValuePtr UnaryFunctionNode::DoSingleOperation (const NE::ValueConstPtr& aValue) const
88+
NE::ValuePtr UnaryOperationNode::DoSingleOperation (const NE::ValueConstPtr& aValue) const
8989
{
9090
double aDouble = NE::NumberValue::ToDouble (aValue);
9191
double result = DoOperation (aDouble);
@@ -96,13 +96,13 @@ NE::ValuePtr UnaryFunctionNode::DoSingleOperation (const NE::ValueConstPtr& aVal
9696
}
9797

9898
AbsoluteNode::AbsoluteNode () :
99-
UnaryFunctionNode ()
99+
UnaryOperationNode ()
100100
{
101101

102102
}
103103

104104
AbsoluteNode::AbsoluteNode (const NE::LocString& name, const NUIE::Point& position) :
105-
UnaryFunctionNode (name, position)
105+
UnaryOperationNode (name, position)
106106
{
107107

108108
}
@@ -118,13 +118,13 @@ double AbsoluteNode::DoOperation (double a) const
118118
}
119119

120120
FloorNode::FloorNode () :
121-
UnaryFunctionNode ()
121+
UnaryOperationNode ()
122122
{
123123

124124
}
125125

126126
FloorNode::FloorNode (const NE::LocString& name, const NUIE::Point& position) :
127-
UnaryFunctionNode (name, position)
127+
UnaryOperationNode (name, position)
128128
{
129129

130130
}
@@ -140,13 +140,13 @@ double FloorNode::DoOperation (double a) const
140140
}
141141

142142
CeilNode::CeilNode () :
143-
UnaryFunctionNode ()
143+
UnaryOperationNode ()
144144
{
145145

146146
}
147147

148148
CeilNode::CeilNode (const NE::LocString& name, const NUIE::Point& position) :
149-
UnaryFunctionNode (name, position)
149+
UnaryOperationNode (name, position)
150150
{
151151

152152
}

Sources/BuiltInNodes/BI_UnaryFunctionNodes.hpp renamed to Sources/BuiltInNodes/BI_UnaryOperationNodes.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef BI_UNARYFUNCTIONNODES_HPP
2-
#define BI_UNARYFUNCTIONNODES_HPP
1+
#ifndef BI_UNARYOPERATIONNODES_HPP
2+
#define BI_UNARYOPERATIONNODES_HPP
33

44
#include "NE_SingleValues.hpp"
55
#include "BI_BasicUINode.hpp"
@@ -8,14 +8,14 @@
88
namespace BI
99
{
1010

11-
class UnaryFunctionNode : public BasicUINode
11+
class UnaryOperationNode : public BasicUINode
1212
{
1313
SERIALIZABLE;
1414

1515
public:
16-
UnaryFunctionNode ();
17-
UnaryFunctionNode (const NE::LocString& name, const NUIE::Point& position);
18-
virtual ~UnaryFunctionNode ();
16+
UnaryOperationNode ();
17+
UnaryOperationNode (const NE::LocString& name, const NUIE::Point& position);
18+
virtual ~UnaryOperationNode ();
1919

2020
virtual void Initialize () override;
2121
virtual NE::ValueConstPtr Calculate (NE::EvaluationEnv& env) const override;
@@ -31,7 +31,7 @@ class UnaryFunctionNode : public BasicUINode
3131
virtual double DoOperation (double a) const = 0;
3232
};
3333

34-
class AbsoluteNode : public UnaryFunctionNode
34+
class AbsoluteNode : public UnaryOperationNode
3535
{
3636
DYNAMIC_SERIALIZABLE (AbsoluteNode);
3737

@@ -44,7 +44,7 @@ class AbsoluteNode : public UnaryFunctionNode
4444
virtual double DoOperation (double a) const override;
4545
};
4646

47-
class FloorNode : public UnaryFunctionNode
47+
class FloorNode : public UnaryOperationNode
4848
{
4949
DYNAMIC_SERIALIZABLE (FloorNode);
5050

@@ -57,7 +57,7 @@ class FloorNode : public UnaryFunctionNode
5757
virtual double DoOperation (double a) const override;
5858
};
5959

60-
class CeilNode : public UnaryFunctionNode
60+
class CeilNode : public UnaryOperationNode
6161
{
6262
DYNAMIC_SERIALIZABLE (CeilNode);
6363

Sources/NodeEngineTest/UnaryFunctionNodesTest.cpp renamed to Sources/NodeEngineTest/UnaryOperationNodesTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
#include "SimpleTest.hpp"
22
#include "NUIE_NodeUIManager.hpp"
3-
#include "BI_UnaryFunctionNodes.hpp"
3+
#include "BI_UnaryOperationNodes.hpp"
44
#include "BI_InputUINodes.hpp"
55
#include "TestUtils.hpp"
66

77
using namespace NE;
88
using namespace NUIE;
99
using namespace BI;
1010

11-
namespace UnaryFunctionNodesTest
11+
namespace UnaryOperationNodesTest
1212
{
1313

14-
static double GetUnaryFunctionResult (double a, const std::function<UINodePtr ()>& nodeCreator)
14+
static double GetUnaryOperationResult (double a, const std::function<UINodePtr ()>& nodeCreator)
1515
{
1616
TestUIEnvironment env;
1717
NodeUIManager uiManager (env);
@@ -26,7 +26,7 @@ static double GetUnaryFunctionResult (double a, const std::function<UINodePtr ()
2626

2727
TEST (TestAbsoluteNode)
2828
{
29-
double result = GetUnaryFunctionResult (-2.0, [&] () {
29+
double result = GetUnaryOperationResult (-2.0, [&] () {
3030
return UINodePtr (new AbsoluteNode (LocString (L"AbsoluteValue"), Point (0, 0)));
3131
});
3232
ASSERT (IsEqual (result, 2.0));
@@ -55,15 +55,15 @@ TEST (TestAbsoluteNodeWithList)
5555

5656
TEST (TestFloorNode)
5757
{
58-
double result = GetUnaryFunctionResult (2.3, [&] () {
58+
double result = GetUnaryOperationResult (2.3, [&] () {
5959
return UINodePtr (new FloorNode (LocString (L"Floor"), Point (0, 0)));
6060
});
6161
ASSERT (IsEqual (result, 2.0));
6262
}
6363

6464
TEST (TestCeilNode)
6565
{
66-
double result = GetUnaryFunctionResult (2.3, [&] () {
66+
double result = GetUnaryOperationResult (2.3, [&] () {
6767
return UINodePtr (new CeilNode (LocString (L"Ceil"), Point (0, 0)));
6868
});
6969
ASSERT (IsEqual (result, 3.0));

0 commit comments

Comments
 (0)