~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/temporary.h

  • Committer: Stewart Smith
  • Date: 2011-03-29 01:30:47 UTC
  • mto: (2257.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: stewart@flamingspork.com-20110329013047-5ujzfx6pahmwuko2
have CachedDirectory print out a warning if we can't stat() something in a directory. We should always have access to at least stat() things in directories Drizzle is running in (otherwise there is likely a problem)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLED_TABLE_TEMPORARY_H
22
 
#define DRIZZLED_TABLE_TEMPORARY_H
 
21
#pragma once
23
22
 
24
23
namespace drizzled
25
24
{
29
28
 
30
29
class Temporary : public Table
31
30
{
32
 
  TableShare *_share; /**< Pointer to the shared metadata about the table */
 
31
  instance::Singular *_share; /**< Pointer to the shared metadata about the table */
33
32
 
34
33
public:
35
 
  Temporary(const TableIdentifier::Type type_arg,
36
 
            const TableIdentifier &identifier,
 
34
  Temporary(const identifier::Table::Type type_arg,
 
35
            const identifier::Table &identifier,
37
36
             char *path_arg, uint32_t path_length_arg) :
38
37
    Table()
39
38
  {
40
 
    _share= new TableShare(type_arg, identifier, path_arg, path_length_arg);
 
39
    _share= new instance::Singular(type_arg, identifier, path_arg, path_length_arg);
41
40
  }
42
41
 
43
42
  ~Temporary()
47
46
  virtual const TableShare *getShare() const { assert(_share); return _share; } /* Get rid of this long term */
48
47
  virtual TableShare *getMutableShare() { assert(_share); return _share; } /* Get rid of this long term */
49
48
  virtual bool hasShare() const { return _share ? true : false ; } /* Get rid of this long term */
50
 
  virtual void setShare(TableShare *new_share) { _share= new_share; } /* Get rid of this long term */
 
49
  virtual void setShare(TableShare *new_share)
 
50
  {
 
51
    _share= static_cast<instance::Singular *>(new_share);
 
52
  }
51
53
 
52
54
  void release(void)
53
55
  {
60
62
} /* namespace table */
61
63
} /* namespace drizzled */
62
64
 
63
 
#endif /* DRIZZLED_TABLE_TEMPORARY_H */