Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 32 lines (21 sloc) 0.749 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#ifndef VARIANT_CALLABLE_HPP_INCLUDED
#define VARIANT_CALLABLE_HPP_INCLUDED

#include <boost/intrusive_ptr.hpp>

#include "formula_callable.hpp"
#include "variant.hpp"

class variant_callable;

typedef boost::intrusive_ptr<variant_callable> variant_callable_ptr;
typedef boost::intrusive_ptr<const variant_callable> const_variant_callable_ptr;

class variant_callable : public game_logic::formula_callable
{
public:
static variant create(variant* v);

const variant& get_value() const { return value_; }
private:
variant_callable(const variant& v);

variant get_value(const std::string& key) const;
void set_value(const std::string& key, const variant& value);

variant create_for_list(const variant& list) const;

variant value_;
};

#endif
Something went wrong with that request. Please try again.