~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message.h

  • Committer: Monty Taylor
  • Date: 2011-03-15 16:10:15 UTC
  • mfrom: (2235.3.1 staging)
  • Revision ID: mordred@inaugust.com-20110315161015-qceggirmf3cct7cw
Merge in libdrizzle install changes, doc changes and some header
refactoring.

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_MESSAGE_H
22
 
#define DRIZZLED_MESSAGE_H
 
21
#pragma once
23
22
 
24
 
#include "drizzled/message/table.h"
25
 
#include "drizzled/message/schema.h"
 
23
#include <drizzled/message/table.h>
 
24
#include <drizzled/message/schema.h>
26
25
#if 0
27
 
#include "drizzled/message/transaction.pb.h"
 
26
#include <drizzled/message/transaction.pb.h>
28
27
#include <google/protobuf/text_format.h>
29
28
#endif
30
 
#include "drizzled/identifier.h"
 
29
#include <drizzled/identifier.h>
31
30
 
32
31
#include <boost/shared_ptr.hpp>
33
32
 
47
46
const std::string &type(drizzled::message::Table::ForeignKeyConstraint::ForeignKeyMatchOption type);
48
47
const std::string &type(drizzled::message::Table::TableType type);
49
48
 
 
49
template<class T> bool is_replicated(const T& reference)
 
50
{
 
51
  if (reference.has_replication_options() and
 
52
      reference.replication_options().has_is_replicated())
 
53
  {
 
54
    return reference.replication_options().is_replicated();
 
55
  }
 
56
 
 
57
  return true;
 
58
}
 
59
 
 
60
template<class T> void set_is_replicated(T& reference, bool arg)
 
61
{
 
62
  message::ReplicationOptions *options= reference.mutable_replication_options();
 
63
  options->set_is_replicated(arg);
 
64
}
 
65
 
50
66
#if 0
51
67
std::ostream& operator<<(std::ostream& output, const message::Transaction &message);
52
68
std::ostream& operator<<(std::ostream& output, const message::Table &message);
56
72
} /* namespace message */
57
73
} /* namespace drizzled */
58
74
 
59
 
#endif /* DRIZZLED_MESSAGE_H */