~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/identifier/table.h

  • Committer: Brian Aker
  • Date: 2010-11-06 22:20:39 UTC
  • mto: This revision was merged to the branch mainline in revision 1910.
  • Revision ID: brian@tangent.org-20101106222039-svjhoxtkw766w1bp
Additional io_cache encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
{
59
59
public:
60
60
  typedef message::Table::TableType Type;
61
 
  typedef std::vector <TableIdentifier> vector;
62
 
  typedef const TableIdentifier& const_reference;
63
 
  typedef TableIdentifier& reference;
64
61
 
65
62
  class Key
66
63
  {
118
115
  Type type;
119
116
  std::string path;
120
117
  std::string table_name;
 
118
  std::string sql_path;
121
119
  Key key;
122
120
  size_t hash_value;
123
121
 
197
195
    return type;
198
196
  }
199
197
 
200
 
  virtual void getSQLPath(std::string &sql_path) const;
 
198
  const std::string &getSQLPath();
201
199
 
202
 
  virtual const std::string &getPath() const;
 
200
  const std::string &getPath() const;
203
201
 
204
202
  void setPath(const std::string &new_path)
205
203
  {
213
211
 
214
212
  void copyToTableMessage(message::Table &message) const;
215
213
 
216
 
  friend bool operator<(TableIdentifier::const_reference left, TableIdentifier::const_reference right)
 
214
  friend bool operator<(const TableIdentifier &left, const TableIdentifier &right)
217
215
  {
218
216
    if (left.getKey() < right.getKey())
219
217
    {
223
221
    return false;
224
222
  }
225
223
 
226
 
  friend std::ostream& operator<<(std::ostream& output, TableIdentifier::const_reference identifier)
 
224
  friend std::ostream& operator<<(std::ostream& output, const TableIdentifier &identifier)
227
225
  {
228
226
    const char *type_str;
229
227
 
258
256
    return output;  // for multiple << operators.
259
257
  }
260
258
 
261
 
  friend bool operator==(TableIdentifier::const_reference left, TableIdentifier::const_reference right)
 
259
  friend bool operator==(TableIdentifier &left, TableIdentifier &right)
262
260
  {
263
261
    if (left.getHashValue() == right.getHashValue())
264
262
    {
275
273
  static size_t build_tmptable_filename(std::vector<char> &buffer);
276
274
 
277
275
public:
278
 
  bool isValid() const;
279
276
 
280
277
  size_t getHashValue() const
281
278
  {
291
288
std::size_t hash_value(TableIdentifier const& b);
292
289
std::size_t hash_value(TableIdentifier::Key const& b);
293
290
 
 
291
typedef std::vector <TableIdentifier> TableIdentifiers;
 
292
 
294
293
} /* namespace drizzled */
295
294
 
296
295
#endif /* DRIZZLED_IDENTIFIER_TABLE_H */