souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
36 class PackRecord :
public Expression {
40 assert(arg !=
nullptr &&
"argument is a null-pointer");
50 std::vector<const Node*> res;
52 res.push_back(cur.get());
60 res->arguments.emplace_back(cur->clone());
67 arg =
map(std::move(arg));
72 void print(std::ostream& os)
const override {
77 bool equal(
const Node& node)
const override {
78 const auto& other =
static_cast<const PackRecord&
>(node);
PackRecord(VecOwn< Expression > args)
bool equal(const Node &node) const override
Equality check for two RAM nodes.
Packs a record's arguments into a reference.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
VecOwn< Expression > arguments
Arguments.
Node is a superclass for all RAM IR classes.
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
An abstract class for manipulating RAM Nodes by substitution.
detail::joined_sequence< Iter, Printer > join(const Iter &a, const Iter &b, const std::string &sep, const Printer &p)
Creates an object to be forwarded to some output stream for printing sequences of elements interspers...
bool equal_targets(const Container &a, const Container &b, const Comparator &comp)
A function testing whether two containers are equal with the given Comparator.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
std::vector< Expression * > getArguments() const
Get record arguments.
PackRecord * clone() const override
Create a clone (i.e.
void print(std::ostream &os) const override
Print RAM node.
std::vector< T * > toPtrVector(const std::vector< std::unique_ptr< T >> &v)
A utility function enabling the creation of a vector of pointers.
std::vector< Own< A > > VecOwn