~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/catalog/instance.h

  • Committer: Brian Aker
  • Date: 2010-12-31 00:19:37 UTC
  • mto: (2060.4.1 clean)
  • mto: This revision was merged to the branch mainline in revision 2073.
  • Revision ID: brian@tangent.org-20101231001937-7pf6rpw52w2qffch
Merge in local_instance change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
public:
43
43
  typedef boost::shared_ptr<Instance> shared_ptr;
44
44
  typedef std::vector<shared_ptr> vector;
 
45
  typedef const Instance* const_pointer;
45
46
 
46
47
  Instance(message::catalog::shared_ptr &message_arg)
47
48
  {
55
56
 
56
57
  static shared_ptr create(message::catalog::shared_ptr &message_arg)
57
58
  {
 
59
    assert(not message_arg->name().empty());
58
60
    return boost::make_shared<Instance>(message_arg);
59
61
  };
60
62
 
61
63
  static shared_ptr create(const identifier::Catalog &identifier)
62
64
  {
63
65
    drizzled::message::catalog::shared_ptr new_message= drizzled::message::catalog::make_shared(identifier);
 
66
    assert(not new_message->name().empty());
64
67
    return boost::make_shared<Instance>(new_message);
65
68
  }
66
69
 
70
73
    return _message->name();
71
74
  }
72
75
 
 
76
  const std::string &name() const
 
77
  {
 
78
    assert(_message);
 
79
    return _message->name();
 
80
  }
 
81
 
73
82
  message::catalog::shared_ptr message() const
74
83
  {
75
84
    return _message;