#pragma once

#include "klammer.h"
#include "target_registry.h"

class Klammer_registry
{
public:
    Klammer_registry() = default;
    void add(const Argtype_registry& argtypes, const Target_registry& targets,
             std::vector<Katom>::iterator begin, std::vector<Katom>::iterator end, std::vector<Katom>& katoms);
    void rationalize(const Target_registry& targets);
    void check_klammer(const std::string& name, const std::string& target, const Locator& loc) const;
    const std::vector<Katom>* constant_body(const std::string& name) const;
    std::string instance_list(int margin) const;
    std::string describe(int margin=0) const;

    std::map<std::string, Klammer> m_klammers {};
};
