view interps/rail/src/NilVar.h @ 6558:4ad4b893c806

<b_jonas> learn links are one of the very few HTML renderers that don\'t try to store a full document tree with heavyweight objects for each node just in case javascript wants to modify it later, so it\'s the only engine that can render those HTMLs that are automatically converted from a PDF and put each letter to a separate element.
author HackBot
date Thu, 14 Jan 2016 11:54:35 +0000
parents 859f9b4339e6
children
line wrap: on
line source

// NilVar.h

#ifndef NIL_VAR_H_RAIL_1
#define NIL_VAR_H_RAIL_1

#include "Var.h"

class NilVar : public Var
{
public:
  NilVar() {}
  virtual ~NilVar() {}

  virtual StringVar * getString(void)
  {
    return NULL;
  }

  virtual ListVar * getList(void)
  {
    return NULL;
  }

  virtual NilVar * getNil(void)
  {
    return this;
  }

  virtual Closure * getClosure(void)
  {
    return NULL;
  }

  virtual std::string toString(void) const
  {
    return "<NIL>";
  }
private:
  NilVar(NilVar const &) {}
  NilVar & operator=(NilVar const &) { return *this; }
};

#endif