about summary refs log tree commit diff stats
path: root/data/maps/the_double_sided/doors.txtpb
blob: 02b113a95e59e6f47dfc658a62ff018694a91758 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
doors {
  name: "Obverse White/Orange Door"
  type: EVENT
  panels { room: "Flipped Orange Area" name: "HEAVEN" }
}
doors {
  name: "Obverse White/Blue Door"
  type: EVENT
  panels { room: "Flipped Blue Area" name: "HEAD" }
}
doors {
  name: "Obverse White/Black Door"
  type: EVENT
  panels { room: "Start" name: "FULL" }
}
doors {
  name: "Obverse White/Green Door"
  type: EVENT
  panels { room: "Flipped Green Area" name: "HIGH" }
}
doors {
  name: "Obverse White/Purple Door"
  type: EVENT
  panels { room: "Flipped Purple Area" name: "CEILING" }
}
doors {
  name: "Flipped White/Orange Door"
  type: EVENT
  panels { room: "Obverse Orange Isolated Section" name: "TOP" }
}
doors {
  name: "Flipped White/Purple Door"
  type: EVENT
  panels { room: "Obverse Orange Isolated Section" name: "TOP" }
  # Is this a mistake? It seems like it should be Obverse Purple Area / ABOVE.
}
doors {
  name: "Flipped White/Yellow Door"
  type: EVENT
  panels { room: "Start" name: "ATTIC" }
}
doors {
  name: "Obverse Black/Green Panel"
  type: EVENT
  # The panel blocks your way; there's no door.
  panels { room: "Obverse Black Area" name: "TRAIN" }
}
doors {
  name: "Obverse Black/Yellow Panel"
  type: EVENT
  # The panel blocks your way; there's no door.
  panels { room: "Obverse Black Area" name: "MOUNTAIN" }
}
doors {
  name: "Obverse Black/Pink Door"
  type: EVENT
  panels { room: "Flipped Black Area" name: "SEAPLANE" }
}
doors {
  name: "Flipped Green/Black Door"
  type: EVENT
  panels { room: "Obverse Black Area" name: "TRAIN" }
}
doors {
  name: "Flipped Green/Purple Door"
  type: EVENT
  panels { room: "Obverse Green Area" name: "UPSIDE" }
}
doors {
  name: "Flipped Orange/Brown Door"
  type: EVENT
  panels { room: "Obverse Orange Front Area" name: "UP" }
  panels { room: "Obverse Orange Back Area" name: "OVER" }
}
doors {
  name: "Obverse Blue/Orange Door"
  type: EVENT
  panels { room: "Flipped Blue Area" name: "SKY" }
}
doors {
  name: "Obverse Red/Orange Door"
  type: EVENT
  panels { room: "Flipped Red Area" name: "RAISED" }
}
doors {
  name: "Obverse Purple/Red Door"
  type: EVENT
  panels { room: "Flipped Purple Area" name: "LEAVES" }
}
doors {
  name: "Obverse Yellow/Blue Door"
  type: EVENT
  panels { room: "Flipped Yellow Back Area" name: "ANGELS" }
}
doors {
  name: "Flipped Pink/Yellow Door"
  type: EVENT
  panels { room: "Obverse Pink Area" name: "CLOUD" }
}
doors {
  name: "Flipped Yellow/Black Door"
  type: EVENT
  panels { room: "Obverse Black Area" name: "MOUNTAIN" }
}
doors {
  name: "Flipped Purple/Red Door"
  type: EVENT
  panels { room: "Obverse Purple Area" name: "DRAGON" }
}
doors {
  name: "Flipped Black/Pink Panel"
  type: EVENT
  # The panel blocks your way; there's no door.
  panels { room: "Flipped Black Area" name: "SEAPLANE" }
}
                                                           

















                                                    
#ifndef NOTION_H_FD1C7646
#define NOTION_H_FD1C7646

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

struct sqlite3_stmt;

namespace verbly {
  
  class database;
  
  class notion {
  public:
    
    // Default constructor
    
    notion() = default;
    
    // Construct from database
    
    notion(const database& db, sqlite3_stmt* row);
    
    // Accessors
    
    bool isValid() const
    {
      return valid_;
    }
    
    int getId() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized notion");
      }
      
      return id_;
    }
    
    part_of_speech getPartOfSpeech() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized notion");
      }
      
      return partOfSpeech_;
    }
    
    bool hasWnid() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized notion");
      }
      
      return hasWnid_;
    }
    
    int getWnid() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized notion");
      }
      
      if (!hasWnid_)
      {
        throw std::domain_error("Notion has no wnid");
      }
      
      return wnid_;
    }
    
    bool hasNumOfImages() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized notion");
      }
      
      return hasNumOfImages_;
    }
    
    int getNumOfImages() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized notion");
      }
      
      if (!hasNumOfImages_)
      {
        throw std::domain_error("Notion does not have a number of images");
      }
      
      return numOfImages_;
    }
    
    // Convenience
    
    std::string getImageNetUrl() const;
    
    // Type info
    
    static const object objectType;
    
    static const std::list<std::string> select;
    
    // Query fields
    
    static const field id;
    static const field partOfSpeech;
    static const field wnid;
    static const field numOfImages;
    
    operator filter() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized notion");
      }

      return (id == id_);
    }
    
    filter operator!() const
    {
      if (!valid_)
      {
        throw std::domain_error("Bad access to uninitialized notion");
      }

      return (id != id_);
    }

    // Relationships with other objects
    
    static const field words;
    
    // Relationships with self
    
    static const field hypernyms;
    static const field hyponyms;
    
    static const field fullHypernyms;
    static const field fullHyponyms;
    
    static const field instances;
    static const field classes;
    
    static const field memberMeronyms;
    static const field memberHolonyms;
    
    static const field fullMemberMeronyms;
    static const field fullMemberHolonyms;
    
    static const field partMeronyms;
    static const field partHolonyms;
    
    static const field fullPartMeronyms;
    static const field fullPartHolonyms;
    
    static const field substanceMeronyms;
    static const field substanceHolonyms;
    
    static const field fullSubstanceMeronyms;
    static const field fullSubstanceHolonyms;
    
    static const field variants;
    static const field attributes;
    
    static const field similarAdjectives;
    
    static const field entails;
    static const field entailedBy;
    
    static const field causes;
    static const field effects;
    
    // Preposition group relationship
    
    class preposition_group_field {
    public:
      
      filter operator==(std::string groupName) const;
      
    private:
      
      static const field isA;
      static const field groupNameField;
    };
    
    static const preposition_group_field prepositionGroups;
    
  private:
    bool valid_ = false;
    
    int id_;
    part_of_speech partOfSpeech_;
    bool hasWnid_ = false;
    int wnid_;
    bool hasNumOfImages_ = false;
    int numOfImages_;
    
    const database* db_;
    
  };
  
};

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