OGLplus  (0.59.0) a C++ wrapper for rendering APIs

newton_node.hpp
Go to the documentation of this file.
1 #ifndef OGLPLUS_TEXGEN_NEWTON_NODE_HPP
9 #define OGLPLUS_TEXGEN_NEWTON_NODE_HPP
10 
11 #include "base_node.hpp"
12 
13 namespace eagine::oglp::texgen {
14 
15 enum class newton_function { xe3minus1, xe4minus1 };
16 
17 class newton_output : public base_output {
18 private:
19  friend class newton_node;
20 
21  newton_function _function;
22 
23  string_view _func_name() const;
24 
25 public:
26  newton_output(node_intf& parent, newton_function);
27 
28  newton_output(node_intf& parent)
29  : newton_output(parent, newton_function::xe3minus1) {}
30 
31  string_view type_name() override;
32 
33  slot_data_type value_type() override;
34 
35  std::ostream& definitions(std::ostream& out, compile_context& ctxt) override;
36 };
37 
38 class newton_node : public single_output_node<newton_output> {
39 public:
40  newton_node& set_function(newton_function function) {
41  _output._function = function;
42  return *this;
43  }
44 };
45 
46 } // namespace eagine::oglp::texgen
47 
48 #if !OGLPLUS_LINK_LIBRARY || defined(OGLPLUS_IMPLEMENTING_LIBRARY)
49 #include <oglplus/texgen/newton_node.inl>
50 #endif
51 
52 #endif // OGLPLUS_TEXGEN_NEWTON_NODE_HPP
value_type
Value tree value element data type enumeration.
Definition: interface.hpp:27
basic_string_span< const char > string_view
Alias for const string views.
Definition: string_span.hpp:116
static auto type_name(const T &) noexcept -> std::string
Returns the demangled name for type T.
Definition: type_name.hpp:24

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).