about summary refs log tree commit diff stats
path: root/data/maps/the_bearer/rooms/Blue Planet.txtpb
blob: b044590acddcb80a81c5a53119e0513028f5bd8e (plain) (blame)
1
name: "Blue Planet"
#fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#ifndef BINDING_H_CAE0B18E
#define BINDING_H_CAE0B18E

#include <string>

namespace verbly {

  class binding {
    public:
      enum class type {
        invalid,
        integer,
        string
      };
      
      // Default constructor
      
      binding()
      {
      }

      // Copy and move constructors

      binding(const binding& other);
      binding(binding&& other);

      // Assignment

      binding& operator=(binding other);

      // Swap

      friend void swap(binding& first, binding& second);

      // Destructor

      ~binding();

      // Generic accessors
      
      type getType() const
      {
        return type_;
      }

      // Integer
      
      binding(int arg);
      
      int getInteger() const;

      // String
      
      binding(std::string arg);
      
      std::string getString() const;

    private:

      union {
        int integer_;
        std::string string_;
      };

      type type_ = type::invalid;
  };

};

#endif /* end of include guard: BINDING_H_CAE0B18E */