[java-libglom] Adapt to the latest libglom API from git master.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-libglom] Adapt to the latest libglom API from git master.
- Date: Mon, 23 Jan 2012 09:44:28 +0000 (UTC)
commit e039369e9ff915974dc711bd060b4b26ca210ef6
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Jan 23 10:40:08 2012 +0100
Adapt to the latest libglom API from git master.
* Makefile.am:
* src/glom.i:
* src/test/java/org/glom/libglom/tests/DocumentTest.java: Replace Lists
with Vectors.
ChangeLog | 9 +++++++++
Makefile.am | 13 ++++++-------
src/glom.i | 17 +++++++----------
.../java/org/glom/libglom/tests/DocumentTest.java | 2 +-
4 files changed, 23 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 163f064..17ce4e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-23 Murray Cumming <murrayc murrayc com>
+
+ Adapt to the latest libglom API from git master.
+
+ * Makefile.am:
+ * src/glom.i:
+ * src/test/java/org/glom/libglom/tests/DocumentTest.java: Replace Lists
+ with Vectors.
+
2012-01-19 Murray Cumming <murrayc murrayc com>
README: Mention the ftp tarball, PPA package, and maven repository.
diff --git a/Makefile.am b/Makefile.am
index d13c4c3..71227b1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,7 +34,7 @@ jardir = $(datadir)/java
generated_java_sources = src/main/java/org/glom/libglom/BakeryDocument.java \
src/main/java/org/glom/libglom/BakeryDocumentXML.java \
src/main/java/org/glom/libglom/ChoiceValue.java \
- src/main/java/org/glom/libglom/ChoiceValueList.java \
+ src/main/java/org/glom/libglom/ChoiceValueVector.java \
src/main/java/org/glom/libglom/CustomTitle.java \
src/main/java/org/glom/libglom/DoubleVector.java \
src/main/java/org/glom/libglom/Document.java \
@@ -68,18 +68,17 @@ generated_java_sources = src/main/java/org/glom/libglom/BakeryDocument.java \
src/main/java/org/glom/libglom/SqlBuilder.java \
src/main/java/org/glom/libglom/SqlExpr.java \
src/main/java/org/glom/libglom/SqlOperatorType.java \
- src/main/java/org/glom/libglom/StringList.java \
src/main/java/org/glom/libglom/StringVector.java \
src/main/java/org/glom/libglom/TableInfo.java \
- src/main/java/org/glom/libglom/TableInfoList.java \
+ src/main/java/org/glom/libglom/TableInfoVector.java \
src/main/java/org/glom/libglom/TranslatableItem.java \
src/main/java/org/glom/libglom/TranslatableItemPair.java \
- src/main/java/org/glom/libglom/TranslatableItemList.java \
+ src/main/java/org/glom/libglom/TranslatableItemVector.java \
src/main/java/org/glom/libglom/TypeNameMap.java \
src/main/java/org/glom/libglom/Value.java \
- src/main/java/org/glom/libglom/ValueList.java \
- src/main/java/org/glom/libglom/ValueListPair.java \
- src/main/java/org/glom/libglom/ValueWithSecondList.java
+ src/main/java/org/glom/libglom/ValueVector.java \
+ src/main/java/org/glom/libglom/ValueVectorPair.java \
+ src/main/java/org/glom/libglom/ValueWithSecondVector.java
swig_sources = src/glom.i \
diff --git a/src/glom.i b/src/glom.i
index 000a2f4..7b08cda 100644
--- a/src/glom.i
+++ b/src/glom.i
@@ -435,27 +435,24 @@ sharedptr<const LayoutItem_Field> get_navigation_relationship_specific()
*/
%template(SortFieldPair) std::pair< Glom::sharedptr<const LayoutItem_Field>, bool>;
-// Include our custom interface file for std::list. It's incomplete but it works for what we need.
-%include std_list.i
-%template(SortClause) std::list<std::pair< Glom::sharedptr<const LayoutItem_Field>, bool> >;
+%template(SortClause) std::vector<std::pair< Glom::sharedptr<const LayoutItem_Field>, bool> >;
/*
* Wrap some other lists.
*/
-%template(StringList) std::list< Glib::ustring >;
%template(TranslatableItemPair) std::pair< Glom::sharedptr<TranslatableItem>, Glib::ustring>;
-%template(TranslatableItemList) std::list<std::pair< Glom::sharedptr<TranslatableItem>, Glib::ustring> >;
-%template(TableInfoList) std::list< Glom::sharedptr<TableInfo> >;
-%template(ChoiceValueList) std::list< Glom::sharedptr<ChoiceValue> >;
+%template(TranslatableItemVector) std::vector<std::pair< Glom::sharedptr<TranslatableItem>, Glib::ustring> >;
+%template(TableInfoVector) std::vector< Glom::sharedptr<TableInfo> >;
+%template(ChoiceValueVector) std::vector< Glom::sharedptr<ChoiceValue> >;
/*
* Wrap Gnome::Gda::Value lists and pairs. These are defined in Glom::Utils.
*/
-%template(ValueList) std::list< Gnome::Gda::Value >;
-%template(ValueListPair) std::pair< Gnome::Gda::Value, std::list<Gnome::Gda::Value> >;
-%template(ValueWithSecondList) std::list< std::pair< Gnome::Gda::Value, std::list<Gnome::Gda::Value> > >;
+%template(ValueVector) std::vector< Gnome::Gda::Value >;
+%template(ValueVectorPair) std::pair< Gnome::Gda::Value, std::vector<Gnome::Gda::Value> >;
+%template(ValueWithSecondVector) std::vector< std::pair< Gnome::Gda::Value, std::vector<Gnome::Gda::Value> > >;
/*
diff --git a/src/test/java/org/glom/libglom/tests/DocumentTest.java b/src/test/java/org/glom/libglom/tests/DocumentTest.java
index 28a45f5..f7f3050 100644
--- a/src/test/java/org/glom/libglom/tests/DocumentTest.java
+++ b/src/test/java/org/glom/libglom/tests/DocumentTest.java
@@ -154,7 +154,7 @@ public class DocumentTest {
layoutFields.add(field);
Field details = field.get_full_field_details();
if (details != null && details.get_primary_key()) {
- sortClause.addLast(new SortFieldPair(field, true)); // ascending
+ sortClause.add(new SortFieldPair(field, true)); // ascending
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]