~zisis00/drizzle/ldap_policy

« back to all changes in this revision

Viewing changes to drizzled/catalog/instance.h

  • Committer: Zisis Sialveras
  • Date: 2012-08-09 18:18:22 UTC
  • mfrom: (2553.1.25 workspace)
  • Revision ID: zisis00@gmail.com-20120809181822-9wobhdfdx411tu5w
Some changes in ldap_policy

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <boost/thread/mutex.hpp>
24
24
#include <boost/make_shared.hpp>
25
25
 
 
26
#include <drizzled/identifier.h>
 
27
#include <drizzled/identifier/catalog.h>
26
28
#include <drizzled/message/catalog.h>
27
29
 
28
30
namespace drizzled {
32
34
{
33
35
  Instance() :
34
36
    _locked(false),
35
 
    _lock_id(0)
 
37
    _lock_id(0),
 
38
    _identifier(str_ref(""))
36
39
  { };
37
40
 
38
41
  bool _locked;
40
43
  message::catalog::shared_ptr _message;
41
44
  mutable boost::mutex _schema_lock;
42
45
  mutable boost::mutex _system_variable_lock;
 
46
  drizzled::identifier::Catalog _identifier;
43
47
 
44
48
 
45
49
public:
49
53
  typedef const Instance& const_reference;
50
54
  typedef Instance& reference;
51
55
 
52
 
  Instance(message::catalog::shared_ptr &message_arg)
 
56
  Instance(message::catalog::shared_ptr &message_arg) :
 
57
    _identifier(message_arg->name())
53
58
  {
54
59
    _message= message_arg;
55
60
  };
56
61
 
57
 
  Instance(const message::catalog::shared_ptr &message_arg)
 
62
  Instance(const message::catalog::shared_ptr &message_arg) :
 
63
    _identifier(message_arg->name())
58
64
  {
59
65
    _message= message_arg;
60
66
  };
72
78
    return boost::make_shared<Instance>(new_message);
73
79
  }
74
80
 
 
81
  const drizzled::identifier::Catalog &identifier() const
 
82
  {
 
83
    return _identifier;
 
84
  }
 
85
 
75
86
  const std::string &getName() const
76
87
  {
77
88
    assert(_message);