<commit_before>#ifndef weaver_node_prog_base_classes_h_
#define weaver_node_prog_base_classes_h_

#include <e/buffer.h>
#include <vector>
#include <unordered_set>
#include "db/element/remote_node.h"

namespace node_prog
{
    class Packable 
    {
        public:
            virtual uint64_t size() const  = 0;
            virtual void pack(e::buffer::packer& packer) const = 0;
            virtual void unpack(e::unpacker& unpacker) = 0;
    };

    class Deletable 
    {
        public:
            virtual ~Deletable() = 0;
    };

    inline Deletable::~Deletable() 
    { 
        /* destructor must be defined */ 
    }

    class Node_Parameters_Base : public virtual Packable
    {
        virtual bool search_cache() = 0; // how is this packabale?
        virtual uint64_t cache_key() = 0;
    };

    class Node_State_Base : public virtual Packable, public virtual Deletable 
    {
        public:
        std::unordered_set<uint64_t> contexts_found;<commit_msg>added virtual destructor to base class of state<commit_after>#ifndef weaver_node_prog_base_classes_h_
#define weaver_node_prog_base_classes_h_

#include <e/buffer.h>
#include <vector>
#include <unordered_set>
#include <iostream>

#include "common/weaver_constants.h"
#include "db/element/remote_node.h"

namespace node_prog
{
    class Packable 
    {
        public:
            virtual uint64_t size() const  = 0;
            virtual void pack(e::buffer::packer& packer) const = 0;
            virtual void unpack(e::unpacker& unpacker) = 0;
    };

    class Deletable 
    {
        public:
            virtual ~Deletable() = 0;
    };

    inline Deletable::~Deletable() 
    { 
        /* destructor must be defined */ 
    }

    class Node_Parameters_Base : public virtual Packable
    {
        virtual bool search_cache() = 0; // how is this packabale?
        virtual uint64_t cache_key() = 0;
    };

    class Node_State_Base : public virtual Packable, public virtual Deletable 
    {
        public:
        virtual ~Node_State_Base() { } // << important
        std::unordered_set<uint64_t> contexts_found;
{'fraction_non_alphanumeric': 0.09498806682577565, 'fraction_numerical': 0.011455847255369928, 'mean_word_length': 2.6013745704467355, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5361921', 'n_tokens_mistral': 701, 'n_tokens_neox': 652, 'n_words': 159}