about summary refs log tree commit diff stats
path: root/data/maps/the_wondrous/doors.txtpb
blob: 39516046dae48929d6948832d65a04f45246e80b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
doors {
  name: "Front Door"
  type: EVENT
  panels { room: "Entry" name: "WONDER" }
}
doors {
  name: "Shrink Door"
  type: STANDARD
  receivers: "Components/Doors/wonderlandDoor2/animationListener2"
  panels { room: "Regular" name: "SHRINK" }
  location_room: "Regular"
}
doors {
  name: "Big Door"
  type: EVENT
  panels { room: "Huge" name: "SHRINK" }
  panels { room: "Huge" name: "IRE" }
  panels { room: "Huge" name: "BRIE" }
  panels { room: "Huge" name: "WICK" }
  panels { room: "Huge" name: "BARK" }
  panels { room: "Huge" name: "HARE" }
  panels { room: "Huge" name: "CHIME" }
  panels { room: "Huge" name: "LIBRARY" }
}
ight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #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 FORM_H_3A6C962C
#define FORM_H_3A6C962C

#include <list>
#include <vector>
#include <string>
#include <stdexcept>
#include "field.h"
#include "filter.h"

struct sqlite3_stmt;

namespace verbly {
  
  class pronunciation;
  class database;
  
  class form {
  public:
    
    // Default constructor
    
    form() = default;
    
    // Construct from database
    
    form(const database& db, sqlite3_stmt* row);
    
    // Accessors
    
    operator bool() const
    {
      return valid_;
    }
    
    int getId() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized form");
      }
      
      return id_;
    }
    
    std::string getText() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized form");
      }
      
      return text_;
    }
    
    int getComplexity() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized form");
      }
      
      return complexity_;
    }
    
    bool isProper() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized form");
      }
      
      return proper_;
    }
    
    const std::vector<pronunciation>& getPronunciations() const;
    
    // Type info
    
    static const object objectType;
    
    static const std::list<std::string> select;
    
    // Query fields
    
    static const field id;
    static const field text;
    static const field complexity;
    static const field proper;
    
    operator filter() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized form");
      }
      
      return (id == id_);
    }
    
    // Relationships to other objects
    
    static const field pronunciation;
    
    class inflection_field {
    public:
      
      inflection_field(inflection category) : category_(category)
      {
      }
      
      const inflection getCategory() const
      {
        return category_;
      }
      
    private:
      
      const inflection category_;
    };
    
    static const inflection_field lemma(inflection category)
    {
      return inflection_field(category);
    }
    
    friend filter operator%=(form::inflection_field check, filter joinCondition);
    
  private:
    bool valid_ = false;
    
    int id_;
    std::string text_;
    int complexity_ ;
    bool proper_;
    
    const database* db_;
    
    mutable bool initializedPronunciations_ = false;
    mutable std::vector<class pronunciation> pronunciations_;
    
    static const field lemmaJoin;
    static const field inflectionCategory;
    
  };
  
};

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