Sha256: 342eedcc8b620d161280bc2cd7486a2e4fe7a6cb23ac07cb39dba7c458c767fa

Contents?: true

Size: 768 Bytes

Versions: 4

Compression:

Stored size: 768 Bytes

Contents

/* Copyright (c) 2024 Julian Benda
 *
 * This file is part of inkCPP which is released under MIT license.
 * See file LICENSE.txt or go to
 * https://github.com/JBenda/inkcpp for full license details.
 */
#pragma once

#include "functional.h"
#include "system.h"

namespace ink::runtime::internal
{
class basic_eval_stack;

// Stores bound functions
class functions
{
public:
	functions();
	~functions();

	// Adds a function to the registry
	void add(hash_t name, function_base* func);

	// Calls a function (if available)
	function_base* find(hash_t name);

private:
	struct entry {
		hash_t         name;
		function_base* value;
		entry*         next;
	};

	// TODO: Better than a linked list?
	entry* _list;
	entry* _last;
};
} // namespace ink::runtime::internal

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
inkcpp_rb-0.1.3 ext/inkcpp_rb/inkcpp/inkcpp/functions.h
inkcpp_rb-0.1.2 ext/inkcpp_rb/inkcpp/inkcpp/functions.h
inkcpp_rb-0.1.1 ext/inkcpp_rb/inkcpp/inkcpp/functions.h
inkcpp_rb-0.1.0 ext/inkcpp_rb/inkcpp/inkcpp/functions.h