Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: timn/clipsmm
base: e73b538786
...
head fork: timn/clipsmm
compare: 5a81c49ef7
  • 4 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jan 04, 2012
@timn Global: add set_value() for single Value ef022fa
@timn autoconf: update C++0x detection
The availability of C++0x (and hence its smart pointers) was not
properly checked. Updated to the latest version from the autoconf
archive and now it works.
7a0382d
@timn factory: remove debug printout
Removed a cout statement which doesn't belong there and which causes
build fails on recent systems.
166bf47
@timn Set version to 0.2.0
Bump SO version as well as this change will likely cause API differences
on many modern systems.
5a81c49
View
2  clipsmm/factory.cpp
@@ -102,7 +102,7 @@ namespace CLIPS {
}
return values;
default:
- std::cout << std::endl << "Type: " << GetType(clipsdo) << std::endl;
+ //std::cout << std::endl << "Type: " << GetType(clipsdo) << std::endl;
throw std::logic_error( "clipsmm::data_object_to_values: Unhandled data object type" );
}
}
View
9 clipsmm/global.cpp
@@ -79,6 +79,15 @@ void Global::set_value( const Values& value ) {
}
}
+void Global::set_value( const Value& value ) {
+ DATA_OBJECT* clips_do;
+ if ( m_cobj ) {
+ clips_do = value_to_data_object( m_environment, value );
+ QSetDefglobalValue( m_environment.cobj(), (defglobal*)m_cobj, clips_do, false );
+ delete clips_do;
+ }
+}
+
void Global::reset_value() {
if ( m_cobj )
QSetDefglobalValue( m_environment.cobj(), (defglobal*)m_cobj, NULL, true );
View
1  clipsmm/global.h
@@ -47,6 +47,7 @@ class Global : public EnvironmentObject
Values value();
void set_value( const Values& values );
+ void set_value( const Value& values );
void reset_value();
View
10 configure.ac
@@ -23,7 +23,7 @@
#########################################################################
pushdef([PACKAGE_MAJOR_VERSION], [0])
pushdef([PACKAGE_MINOR_VERSION], [2])
-pushdef([PACKAGE_MICRO_VERSION], [0])
+pushdef([PACKAGE_MICRO_VERSION], [1])
pushdef([PKG_VERSION], PACKAGE_MAJOR_VERSION.PACKAGE_MINOR_VERSION.PACKAGE_MICRO_VERSION)
AC_INIT([clipsmm], PKG_VERSION, [rvinyard@cs.nmsu.edu])
@@ -43,7 +43,7 @@ popdef([PKG_VERSION])
# ? : ? : 0 == no new interfaces, but breaks apps
# ? : +1 : ? == just some internal changes, nothing breaks but might work better
# CURRENT : REVISION : AGE
-LIBTOOL_SO_VERSION=1:0:0
+LIBTOOL_SO_VERSION=2:0:0
LIBTOOL_SO_VERSION_MAJOR=0
AC_SUBST(LIBTOOL_SO_VERSION)
AC_SUBST(LIBTOOL_SO_VERSION_MAJOR)
@@ -133,10 +133,10 @@ AC_DEFUN(
)
AC_MSG_CHECKING([for c++0x smart pointers])
-AS_IF([test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
- test "$ac_cv_cxx_compile_cxx0x_cxx" = yes],
+AS_IF([test "$ax_cv_cxx_compile_cxx0x_native" = yes ||
+ test "$ax_cv_cxx_compile_cxx0x_cxx" = yes],
[
- AS_IF([test "$ac_cv_cxx_compile_cxx0x_cxx" = yes],
+ AS_IF([test "$ax_cv_cxx_compile_cxx0x_cxx" = yes],
[ CXXFLAGS="$CXXFLAGS -std=c++0x"
AC_SUBST(CXXFLAGS)
CPP0XFLAGS="-std=c++0x"
View
111 m4/ac_cxx_compile_stdcxx_0x.m4
@@ -1,111 +0,0 @@
-#############################################################################
-# Synopsis
-#
-# AC_CXX_COMPILE_STDCXX_0X
-#############################################################################
-# Description
-#
-# Check for baseline language coverage in the compiler for the C++0x standard.
-#############################################################################
-# Author
-#
-# Benjamin Kosnik <bkoz@redhat.com>
-#############################################################################
-# Last Modified
-#
-# 2008-04-17
-#############################################################################
-# License
-# Copyright © 2008 Benjamin Kosnik <bkoz@redhat.com>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice and
-# this notice are preserved.
-#############################################################################
-
-AC_DEFUN([AC_CXX_COMPILE_STDCXX_0X], [
- AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
- ac_cv_cxx_compile_cxx0x_native,
- [AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE([
- template <typename T>
- struct check
-{
- static_assert(sizeof(int) <= sizeof(T), "not big enough");
-};
-
- typedef check<check<bool>> right_angle_brackets;
-
- int a;
- decltype(a) b;
-
- typedef check<int> check_type;
- check_type c;
- check_type&& cr = c;],,
- ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
- AC_LANG_RESTORE
- ])
-
- AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
- ac_cv_cxx_compile_cxx0x_cxx,
- [AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -std=c++0x"
- AC_TRY_COMPILE([
- template <typename T>
- struct check
-{
- static_assert(sizeof(int) <= sizeof(T), "not big enough");
-};
-
- typedef check<check<bool>> right_angle_brackets;
-
- int a;
- decltype(a) b;
-
- typedef check<int> check_type;
- check_type c;
- check_type&& cr = c;],,
- ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
- CXXFLAGS="$ac_save_CXXFLAGS"
- AC_LANG_RESTORE
- ])
-
- AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
- ac_cv_cxx_compile_cxx0x_gxx,
- [AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- ac_save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -std=gnu++0x"
- AC_TRY_COMPILE([
- template <typename T>
- struct check
-{
- static_assert(sizeof(int) <= sizeof(T), "not big enough");
-};
-
- typedef check<check<bool>> right_angle_brackets;
-
- int a;
- decltype(a) b;
-
- typedef check<int> check_type;
- check_type c;
- check_type&& cr = c;],,
- ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
- CXXFLAGS="$ac_save_CXXFLAGS"
- AC_LANG_RESTORE
- ])
-
- if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
- test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
- test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
- AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
- fi
-])
-
-
-
-
View
107 m4/ax_cxx_compile_stdcxx_0x.m4
@@ -0,0 +1,107 @@
+# ============================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_0x.html
+# ============================================================================
+#
+# SYNOPSIS
+#
+# AX_CXX_COMPILE_STDCXX_0X
+#
+# DESCRIPTION
+#
+# Check for baseline language coverage in the compiler for the C++0x
+# standard.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 7
+
+AU_ALIAS([AC_CXX_COMPILE_STDCXX_0X], [AX_CXX_COMPILE_STDCXX_0X])
+AC_DEFUN([AX_CXX_COMPILE_STDCXX_0X], [
+ AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
+ ax_cv_cxx_compile_cxx0x_native,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ template <typename T>
+ struct check
+ {
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
+ };
+
+ typedef check<check<bool>> right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check<int> check_type;
+ check_type c;
+ check_type&& cr = static_cast<check_type&&>(c);],,
+ ax_cv_cxx_compile_cxx0x_native=yes, ax_cv_cxx_compile_cxx0x_native=no)
+ AC_LANG_RESTORE
+ ])
+
+ AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
+ ax_cv_cxx_compile_cxx0x_cxx,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
+ AC_TRY_COMPILE([
+ template <typename T>
+ struct check
+ {
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
+ };
+
+ typedef check<check<bool>> right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check<int> check_type;
+ check_type c;
+ check_type&& cr = static_cast<check_type&&>(c);],,
+ ax_cv_cxx_compile_cxx0x_cxx=yes, ax_cv_cxx_compile_cxx0x_cxx=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+ AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
+ ax_cv_cxx_compile_cxx0x_gxx,
+ [AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
+ AC_TRY_COMPILE([
+ template <typename T>
+ struct check
+ {
+ static_assert(sizeof(int) <= sizeof(T), "not big enough");
+ };
+
+ typedef check<check<bool>> right_angle_brackets;
+
+ int a;
+ decltype(a) b;
+
+ typedef check<int> check_type;
+ check_type c;
+ check_type&& cr = static_cast<check_type&&>(c);],,
+ ax_cv_cxx_compile_cxx0x_gxx=yes, ax_cv_cxx_compile_cxx0x_gxx=no)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+ if test "$ax_cv_cxx_compile_cxx0x_native" = yes ||
+ test "$ax_cv_cxx_compile_cxx0x_cxx" = yes ||
+ test "$ax_cv_cxx_compile_cxx0x_gxx" = yes; then
+ AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
+ fi
+])

No commit comments for this range

Something went wrong with that request. Please try again.