activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r565187 - in /activemq/activemq-cpp/trunk/src/decaf/src/main: Makefile.am decaf/internal/AprPool.cpp decaf/internal/AprPool.h
Date Sun, 12 Aug 2007 22:30:36 GMT
Author: tabish
Date: Sun Aug 12 15:30:33 2007
New Revision: 565187

URL: http://svn.apache.org/viewvc?view=rev&rev=565187
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103

Created a wrapper class for APR Pools for use in classes that need an static apr pool.

Added:
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.cpp
    activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.h
Modified:
    activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am

Modified: activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am?view=diff&rev=565187&r1=565186&r2=565187
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/Makefile.am Sun Aug 12 15:30:33 2007
@@ -56,6 +56,7 @@
    decaf/util/logging/SimpleLogger.cpp \
    decaf/util/logging/LogManager.cpp \
    decaf/util/Config.cpp \
+   decaf/internal/AprPool.cpp \
    decaf/internal/util/BigInt.cpp \
    decaf/internal/util/BitOps.cpp \
    decaf/internal/util/NumberConverter.cpp \
@@ -150,6 +151,7 @@
    decaf/util/logging/LogWriter.h \
    decaf/util/logging/SimpleLogger.h \
    decaf/util/logging/PropertiesChangeListener.h \
+   decaf/internal/AprPool.h \
    decaf/internal/util/NumberConverter.h \
    decaf/internal/util/FloatingPointParser.h \
    decaf/internal/util/HexStringParser.h \

Added: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.cpp?view=auto&rev=565187
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.cpp (added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.cpp Sun Aug 12 15:30:33
2007
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AprPool.h"
+
+using namespace decaf;
+using namespace decaf::internal;
+
+////////////////////////////////////////////////////////////////////////////////
+AprPool::AprPool() {
+    apr_pool_create( &aprPool, NULL );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+AprPool::~AprPool() {
+    apr_pool_destroy( aprPool );
+}

Added: activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.h?view=auto&rev=565187
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.h (added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/main/decaf/internal/AprPool.h Sun Aug 12 15:30:33
2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _DECAF_INTERNAL_APRPOOL_H_
+#define _DECAF_INTERNAL_APRPOOL_H_
+
+#include <decaf/util/Config.h>
+#include <apr_pools.h>
+
+namespace decaf{
+namespace internal{
+
+    /**
+     * Wraps an APR pool object so that classes in decaf can create a static
+     * member for use in static methods where apr function calls that need a pool
+     * are made.
+     */
+    class AprPool {
+    private:
+
+        apr_pool_t* aprPool;
+
+    public:
+
+        AprPool();
+        virtual ~AprPool();
+
+        /**
+         * Gets the internal APR Pool.
+         * @returns the internal APR pool
+         */
+        apr_pool_t* getAprPool() const {
+            return aprPool;
+        }
+
+    };
+
+}}
+
+#endif /*_DECAF_INTERNAL_APRPOOL_H_*/



Mime
View raw message