From a7ec19749a76cc262240124f5c71c1ee4051cba7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 31 Aug 2011 14:19:56 +0200 Subject: Rename comp_value() predicate to composite() --- odb/relational/header.hxx | 12 ++++++------ odb/relational/inline.hxx | 2 +- odb/relational/mysql/common.cxx | 2 +- odb/relational/mysql/context.cxx | 2 +- odb/relational/mysql/source.cxx | 16 ++++++++-------- odb/relational/pgsql/common.cxx | 2 +- odb/relational/pgsql/context.cxx | 2 +- odb/relational/pgsql/schema.cxx | 2 +- odb/relational/pgsql/source.cxx | 20 ++++++++++---------- odb/relational/schema.hxx | 4 ++-- odb/relational/source.hxx | 20 ++++++++++---------- odb/relational/sqlite/common.cxx | 2 +- odb/relational/sqlite/context.cxx | 2 +- odb/relational/sqlite/source.cxx | 16 ++++++++-------- odb/relational/type-processor.cxx | 6 +++--- 15 files changed, 55 insertions(+), 55 deletions(-) (limited to 'odb/relational') diff --git a/odb/relational/header.hxx b/odb/relational/header.hxx index 5c0a00c..69f7977 100644 --- a/odb/relational/header.hxx +++ b/odb/relational/header.hxx @@ -48,7 +48,7 @@ namespace relational // Ignore transient bases. // - if (!(obj || comp_value (c))) + if (!(obj || composite (c))) return; if (first_) @@ -102,7 +102,7 @@ namespace relational names (c); - if (!comp_value (c)) + if (!composite (c)) os << "std::size_t version;"; os << "};"; @@ -296,7 +296,7 @@ namespace relational // size_t n; - if (class_* kc = comp_value_wrapper (*kt)) + if (class_* kc = composite_wrapper (*kt)) n = in_column_count (*kc); else n = 1; @@ -316,7 +316,7 @@ namespace relational // // Value is also a key. // - //if (class_* vc = comp_value_wrapper (vt)) + //if (class_* vc = composite_wrapper (vt)) // cond_columns += in_column_count (*vc); //else // cond_columns++; @@ -325,7 +325,7 @@ namespace relational } } - if (class_* vc = comp_value_wrapper (vt)) + if (class_* vc = composite_wrapper (vt)) data_columns += in_column_count (*vc); else data_columns++; @@ -754,7 +754,7 @@ namespace relational if (object (c)) traverse_object (c); - else if (comp_value (c)) + else if (composite (c)) traverse_composite (c); } diff --git a/odb/relational/inline.hxx b/odb/relational/inline.hxx index 9e0627a..311640e 100644 --- a/odb/relational/inline.hxx +++ b/odb/relational/inline.hxx @@ -86,7 +86,7 @@ namespace relational if (object (c)) traverse_object (c); - else if (comp_value (c)) + else if (composite (c)) traverse_composite (c); } diff --git a/odb/relational/mysql/common.cxx b/odb/relational/mysql/common.cxx index cc657d1..c2e6fa3 100644 --- a/odb/relational/mysql/common.cxx +++ b/odb/relational/mysql/common.cxx @@ -35,7 +35,7 @@ namespace relational semantics::type& t (type_override_ != 0 ? *type_override_ : m.type ()); - if (semantics::class_* c = comp_value_wrapper (t)) + if (semantics::class_* c = composite_wrapper (t)) { // If t is a wrapper, pass the wrapped type. Also pass the // original, wrapper type. diff --git a/odb/relational/mysql/context.cxx b/odb/relational/mysql/context.cxx index 8843fe0..ccd1861 100644 --- a/odb/relational/mysql/context.cxx +++ b/odb/relational/mysql/context.cxx @@ -124,7 +124,7 @@ namespace relational { // Ignore transient bases. // - if (!(context::object (c) || context::comp_value (c))) + if (!(context::object (c) || context::composite (c))) return; if (c.count ("mysql-grow")) diff --git a/odb/relational/mysql/source.cxx b/odb/relational/mysql/source.cxx index 190ca93..02bc74b 100644 --- a/odb/relational/mysql/source.cxx +++ b/odb/relational/mysql/source.cxx @@ -185,7 +185,7 @@ namespace relational { if (var_override_.empty ()) { - if (semantics::class_* c = comp_value (mi.t)) + if (semantics::class_* c = composite (mi.t)) os << "n += " << in_column_count (*c) << "UL;"; else os << "n++;"; @@ -357,7 +357,7 @@ namespace relational virtual void post (member_info& mi) { - if (semantics::class_* c = comp_value (mi.t)) + if (semantics::class_* c = composite (mi.t)) index_ += in_column_count (*c); else index_++; @@ -510,7 +510,7 @@ namespace relational // "unwrap" it. For simple values this is taken care of // by the value_traits specializations. // - if (mi.wrapper != 0 && comp_value (mi.t)) + if (mi.wrapper != 0 && composite (mi.t)) { // Here we need the wrapper type, not the wrapped type. // @@ -518,7 +518,7 @@ namespace relational "get_ref (" + member + ")"; } - if (comp_value (mi.t)) + if (composite (mi.t)) traits = "composite_value_traits< " + mi.fq_type () + " >"; else { @@ -591,7 +591,7 @@ namespace relational virtual void post (member_info& mi) { - if (!comp_value (mi.t)) + if (!composite (mi.t)) { // When handling a pointer, mi.t is the id type of the referenced // object. @@ -779,7 +779,7 @@ namespace relational // "unwrap" it. For simple values this is taken care of // by the value_traits specializations. // - if (mi.wrapper != 0 && comp_value (mi.t)) + if (mi.wrapper != 0 && composite (mi.t)) { // Here we need the wrapper type, not the wrapped type. // @@ -787,7 +787,7 @@ namespace relational "set_ref (" + member + ")"; } - if (comp_value (mi.t)) + if (composite (mi.t)) traits = "composite_value_traits< " + mi.fq_type () + " >"; else { @@ -839,7 +839,7 @@ namespace relational virtual void post (member_info& mi) { - if (comp_value (mi.t)) + if (composite (mi.t)) return; // When handling a pointer, mi.t is the id type of the referenced diff --git a/odb/relational/pgsql/common.cxx b/odb/relational/pgsql/common.cxx index a753d86..facdb0f 100644 --- a/odb/relational/pgsql/common.cxx +++ b/odb/relational/pgsql/common.cxx @@ -35,7 +35,7 @@ namespace relational semantics::type& t (type_override_ != 0 ? *type_override_ : m.type ()); - if (semantics::class_* c = comp_value_wrapper (t)) + if (semantics::class_* c = composite_wrapper (t)) { // If t is a wrapper, pass the wrapped type. Also pass the // original, wrapper type. diff --git a/odb/relational/pgsql/context.cxx b/odb/relational/pgsql/context.cxx index 20dc460..68739df 100644 --- a/odb/relational/pgsql/context.cxx +++ b/odb/relational/pgsql/context.cxx @@ -113,7 +113,7 @@ namespace relational { // Ignore transient bases. // - if (!(context::object (c) || context::comp_value (c))) + if (!(context::object (c) || context::composite (c))) return; if (c.count ("pgsql-grow")) diff --git a/odb/relational/pgsql/schema.cxx b/odb/relational/pgsql/schema.cxx index 761206e..a1ef29d 100644 --- a/odb/relational/pgsql/schema.cxx +++ b/odb/relational/pgsql/schema.cxx @@ -213,7 +213,7 @@ namespace relational // value // - if (semantics::class_* cvt = comp_value_wrapper (vt)) + if (semantics::class_* cvt = composite_wrapper (vt)) { object_columns_references ocr (e_, os_, name); ocr.traverse (m, *cvt, "value", "value"); diff --git a/odb/relational/pgsql/source.cxx b/odb/relational/pgsql/source.cxx index 5050315..b869520 100644 --- a/odb/relational/pgsql/source.cxx +++ b/odb/relational/pgsql/source.cxx @@ -161,7 +161,7 @@ namespace relational { if (var_override_.empty ()) { - if (semantics::class_* c = comp_value (mi.t)) + if (semantics::class_* c = composite (mi.t)) os << "n += " << in_column_count (*c) << "UL;"; else os << "n++;"; @@ -299,7 +299,7 @@ namespace relational virtual void post (member_info& mi) { - if (semantics::class_* c = comp_value (mi.t)) + if (semantics::class_* c = composite (mi.t)) index_ += in_column_count (*c); else index_++; @@ -426,7 +426,7 @@ namespace relational // "unwrap" it. For simple values this is taken care of // by the value_traits specializations. // - if (mi.wrapper != 0 && comp_value (mi.t)) + if (mi.wrapper != 0 && composite (mi.t)) { // Here we need the wrapper type, not the wrapped type. // @@ -434,7 +434,7 @@ namespace relational "get_ref (" + member + ")"; } - if (comp_value (mi.t)) + if (composite (mi.t)) traits = "composite_value_traits< " + mi.fq_type () + " >"; else { @@ -507,7 +507,7 @@ namespace relational virtual void post (member_info& mi) { - if (!comp_value (mi.t)) + if (!composite (mi.t)) { // When handling a pointer, mi.t is the id type of the referenced // object. @@ -669,7 +669,7 @@ namespace relational // "unwrap" it. For simple values this is taken care of // by the value_traits specializations. // - if (mi.wrapper != 0 && comp_value (mi.t)) + if (mi.wrapper != 0 && composite (mi.t)) { // Here we need the wrapper type, not the wrapped type. // @@ -677,7 +677,7 @@ namespace relational "set_ref (" + member + ")"; } - if (comp_value (mi.t)) + if (composite (mi.t)) traits = "composite_value_traits< " + mi.fq_type () + " >"; else { @@ -729,7 +729,7 @@ namespace relational virtual void post (member_info& mi) { - if (comp_value (mi.t)) + if (composite (mi.t)) return; // When handling a pointer, mi.t is the id type of the referenced @@ -1094,7 +1094,7 @@ namespace relational case ck_multimap: { if (semantics::class_* ktc = - comp_value_wrapper (container_kt (t))) + composite_wrapper (container_kt (t))) { instance st; st->traverse (m, *ktc, "key", "key"); @@ -1112,7 +1112,7 @@ namespace relational } } - if (semantics::class_* vtc = comp_value_wrapper (vt)) + if (semantics::class_* vtc = composite_wrapper (vt)) { instance st; st->traverse (m, *vtc, "value", "value"); diff --git a/odb/relational/schema.hxx b/odb/relational/schema.hxx index 47af95e..3fde82a 100644 --- a/odb/relational/schema.hxx +++ b/odb/relational/schema.hxx @@ -424,7 +424,7 @@ namespace relational os << "," << endl; - if (semantics::class_* ckt = comp_value_wrapper (kt)) + if (semantics::class_* ckt = composite_wrapper (kt)) { instance oc; oc->traverse (m, *ckt, "key", "key"); @@ -442,7 +442,7 @@ namespace relational { os << "," << endl; - if (semantics::class_* cvt = comp_value_wrapper (vt)) + if (semantics::class_* cvt = composite_wrapper (vt)) { instance oc; oc->traverse (m, *cvt, "value", "value"); diff --git a/odb/relational/source.hxx b/odb/relational/source.hxx index a81ac3a..d9cf66f 100644 --- a/odb/relational/source.hxx +++ b/odb/relational/source.hxx @@ -406,7 +406,7 @@ namespace relational // Ignore transient bases. // - if (!(obj || comp_value (c))) + if (!(obj || composite (c))) return; os << "// " << c.name () << " base" << endl @@ -463,7 +463,7 @@ namespace relational // Ignore transient bases. // - if (!(obj || comp_value (c))) + if (!(obj || composite (c))) return; os << "// " << c.name () << " base" << endl @@ -521,7 +521,7 @@ namespace relational // Ignore transient bases. // - if (!(obj || comp_value (c))) + if (!(obj || composite (c))) return; os << "// " << c.name () << " base" << endl @@ -572,7 +572,7 @@ namespace relational // Ignore transient bases. // - if (!(obj || comp_value (c))) + if (!(obj || composite (c))) return; os << "// " << c.name () << " base" << endl @@ -777,7 +777,7 @@ namespace relational { instance t (table, false, false); - if (semantics::class_* ckt = comp_value_wrapper (*kt)) + if (semantics::class_* ckt = composite_wrapper (*kt)) t->traverse (m, *ckt, "key", "key"); else { @@ -796,7 +796,7 @@ namespace relational instance t (table, false); - if (semantics::class_* cvt = comp_value_wrapper (vt)) + if (semantics::class_* cvt = composite_wrapper (vt)) t->traverse (m, *cvt, "value", "value"); else { @@ -853,7 +853,7 @@ namespace relational { instance t (false, false); - if (semantics::class_* ckt = comp_value_wrapper (*kt)) + if (semantics::class_* ckt = composite_wrapper (*kt)) t->traverse (m, *ckt, "key", "key"); else { @@ -871,7 +871,7 @@ namespace relational instance t (false); - if (semantics::class_* cvt = comp_value_wrapper (vt)) + if (semantics::class_* cvt = composite_wrapper (vt)) t->traverse (m, *cvt, "value", "value"); else { @@ -1029,7 +1029,7 @@ namespace relational instance bm ("key_", "d", *kt, "key_type", "key"); bm->traverse (m); - if (semantics::class_* c = comp_value_wrapper (*kt)) + if (semantics::class_* c = composite_wrapper (*kt)) os << "n += " << in_column_count (*c) << "UL;" << endl; else @@ -1902,7 +1902,7 @@ namespace relational if (object (c)) traverse_object (c); - else if (comp_value (c)) + else if (composite (c)) traverse_composite (c); } diff --git a/odb/relational/sqlite/common.cxx b/odb/relational/sqlite/common.cxx index 1578561..3429d9f 100644 --- a/odb/relational/sqlite/common.cxx +++ b/odb/relational/sqlite/common.cxx @@ -35,7 +35,7 @@ namespace relational semantics::type& t (type_override_ != 0 ? *type_override_ : m.type ()); - if (semantics::class_* c = comp_value_wrapper (t)) + if (semantics::class_* c = composite_wrapper (t)) { // If t is a wrapper, pass the wrapped type. Also pass the // original, wrapper type. diff --git a/odb/relational/sqlite/context.cxx b/odb/relational/sqlite/context.cxx index 149cf0a..f10e904 100644 --- a/odb/relational/sqlite/context.cxx +++ b/odb/relational/sqlite/context.cxx @@ -111,7 +111,7 @@ namespace relational { // Ignore transient bases. // - if (!(context::object (c) || context::comp_value (c))) + if (!(context::object (c) || context::composite (c))) return; if (c.count ("sqlite-grow")) diff --git a/odb/relational/sqlite/source.cxx b/odb/relational/sqlite/source.cxx index a482184..4a2b0ab 100644 --- a/odb/relational/sqlite/source.cxx +++ b/odb/relational/sqlite/source.cxx @@ -61,7 +61,7 @@ namespace relational { if (var_override_.empty ()) { - if (semantics::class_* c = comp_value (mi.t)) + if (semantics::class_* c = composite (mi.t)) os << "n += " << in_column_count (*c) << "UL;"; else os << "n++;"; @@ -157,7 +157,7 @@ namespace relational virtual void post (member_info& mi) { - if (semantics::class_* c = comp_value (mi.t)) + if (semantics::class_* c = composite (mi.t)) index_ += in_column_count (*c); else index_++; @@ -243,7 +243,7 @@ namespace relational // "unwrap" it. For simple values this is taken care of // by the value_traits specializations. // - if (mi.wrapper != 0 && comp_value (mi.t)) + if (mi.wrapper != 0 && composite (mi.t)) { // Here we need the wrapper type, not the wrapped type. // @@ -251,7 +251,7 @@ namespace relational "get_ref (" + member + ")"; } - if (comp_value (mi.t)) + if (composite (mi.t)) traits = "composite_value_traits< " + mi.fq_type () + " >"; else { @@ -324,7 +324,7 @@ namespace relational virtual void post (member_info& mi) { - if (!comp_value (mi.t)) + if (!composite (mi.t)) { // When handling a pointer, mi.t is the id type of the referenced // object. @@ -430,7 +430,7 @@ namespace relational // "unwrap" it. For simple values this is taken care of // by the value_traits specializations. // - if (mi.wrapper != 0 && comp_value (mi.t)) + if (mi.wrapper != 0 && composite (mi.t)) { // Here we need the wrapper type, not the wrapped type. // @@ -438,7 +438,7 @@ namespace relational "set_ref (" + member + ")"; } - if (comp_value (mi.t)) + if (composite (mi.t)) traits = "composite_value_traits< " + mi.fq_type () + " >"; else { @@ -490,7 +490,7 @@ namespace relational virtual void post (member_info& mi) { - if (comp_value (mi.t)) + if (composite (mi.t)) return; // When handling a pointer, mi.t is the id type of the referenced diff --git a/odb/relational/type-processor.cxx b/odb/relational/type-processor.cxx index 26a43bc..12d2b52 100644 --- a/odb/relational/type-processor.cxx +++ b/odb/relational/type-processor.cxx @@ -127,7 +127,7 @@ namespace relational // Nothing to do if this is a composite value type. // - if (comp_value_wrapper (t)) + if (composite_wrapper (t)) return; string type, ref_type; @@ -229,7 +229,7 @@ namespace relational wh = t.get ("wrapper-hint"); } - if (comp_value_wrapper (t)) + if (composite_wrapper (t)) return; string type; @@ -1089,7 +1089,7 @@ namespace relational { bool obj (object (c)); - if (!(obj || comp_value (c))) + if (!(obj || composite (c))) return; names (c); -- cgit v1.1