You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/09/16 12:02:14 UTC
svn commit: r997670 - in /subversion/branches/object-model: ./
subversion/bindings/c++/ subversion/tests/libsvn++/
Author: hwright
Date: Thu Sep 16 10:02:14 2010
New Revision: 997670
URL: http://svn.apache.org/viewvc?rev=997670&view=rev
Log:
On the object-model branch:
Add the Client test, with a single method to wrap a very simple function.
* build.conf
(libsvn++): Add the client library as a dependency.
(client-cpp-test): New.
* subversion/bindings/c++/Client.cpp,
subversion/bindings/c++/Client.h,
subversion/bindings/c++/Version.cpp,
subversion/bindings/c++/Version.h,
subversion/tests/libsvn++/client-test.cpp:
New.
Added:
subversion/branches/object-model/subversion/bindings/c++/Client.cpp (with props)
subversion/branches/object-model/subversion/bindings/c++/Client.h (with props)
subversion/branches/object-model/subversion/bindings/c++/Version.cpp (with props)
subversion/branches/object-model/subversion/bindings/c++/Version.h (with props)
subversion/branches/object-model/subversion/tests/libsvn++/client-test.cpp (with props)
Modified:
subversion/branches/object-model/build.conf
subversion/branches/object-model/subversion/tests/libsvn++/ (props changed)
Modified: subversion/branches/object-model/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/build.conf?rev=997670&r1=997669&r2=997670&view=diff
==============================================================================
--- subversion/branches/object-model/build.conf (original)
+++ subversion/branches/object-model/build.conf Thu Sep 16 10:02:14 2010
@@ -526,7 +526,7 @@ msvc-static = no
description = Subversion C++ bindings
type = lib
path = subversion/bindings/c++
-libs = apr libsvn_subr
+libs = apr libsvn_subr libsvn_client
sources = *.cpp
install = c++-lib
@@ -539,6 +539,15 @@ install = test
libs = libsvn_test libsvn++
link-cmd = $(LINK_CXX)
+[client-cpp-test]
+description = Subversion C++ client bindings tests
+type = exe
+path = subversion/tests/libsvn++
+sources = client-test.cpp
+install = test
+libs = libsvn_test libsvn++
+link-cmd = $(LINK_CXX)
+
# ----------------------------------------------------------------------------
#
# JavaHL targets
Added: subversion/branches/object-model/subversion/bindings/c++/Client.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/bindings/c%2B%2B/Client.cpp?rev=997670&view=auto
==============================================================================
--- subversion/branches/object-model/subversion/bindings/c++/Client.cpp (added)
+++ subversion/branches/object-model/subversion/bindings/c++/Client.cpp Thu Sep 16 10:02:14 2010
@@ -0,0 +1,43 @@
+/**
+ * @copyright
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ * @endcopyright
+ *
+ */
+
+#include "Client.h"
+
+namespace SVN {
+
+Client::Client()
+{
+}
+
+Version
+Client::getVersion()
+{
+ return Version(svn_client_version());
+}
+
+Client::~Client()
+{
+}
+
+}
Propchange: subversion/branches/object-model/subversion/bindings/c++/Client.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: subversion/branches/object-model/subversion/bindings/c++/Client.h
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/bindings/c%2B%2B/Client.h?rev=997670&view=auto
==============================================================================
--- subversion/branches/object-model/subversion/bindings/c++/Client.h (added)
+++ subversion/branches/object-model/subversion/bindings/c++/Client.h Thu Sep 16 10:02:14 2010
@@ -0,0 +1,52 @@
+/**
+ * @copyright
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ * @endcopyright
+ *
+ * @file Client.h
+ * @brief Interface of the class Client
+ */
+
+#ifndef CLIENT_H
+#define CLIENT_H
+
+#include "Version.h"
+
+#include "svn_client.h"
+
+namespace SVN
+{
+
+ class Client
+ {
+ private:
+
+ public:
+ /** The constructor. */
+ Client();
+
+ Version getVersion();
+
+ /** The destructor needs to be public. */
+ virtual ~Client();
+ };
+}
+
+#endif // CLIENT_H
Propchange: subversion/branches/object-model/subversion/bindings/c++/Client.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: subversion/branches/object-model/subversion/bindings/c++/Version.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/bindings/c%2B%2B/Version.cpp?rev=997670&view=auto
==============================================================================
--- subversion/branches/object-model/subversion/bindings/c++/Version.cpp (added)
+++ subversion/branches/object-model/subversion/bindings/c++/Version.cpp Thu Sep 16 10:02:14 2010
@@ -0,0 +1,47 @@
+/**
+ * @copyright
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ * @endcopyright
+ *
+ */
+
+#include "Version.h"
+
+namespace SVN {
+
+Version::Version(const svn_version_t *ver)
+ : m_major(ver->major),
+ m_minor(ver->minor),
+ m_patch(ver->patch),
+ m_tag(ver->tag)
+{
+}
+
+std::string
+Version::getTag()
+{
+ return m_tag;
+}
+
+Version::~Version()
+{
+}
+
+}
Propchange: subversion/branches/object-model/subversion/bindings/c++/Version.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: subversion/branches/object-model/subversion/bindings/c++/Version.h
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/bindings/c%2B%2B/Version.h?rev=997670&view=auto
==============================================================================
--- subversion/branches/object-model/subversion/bindings/c++/Version.h (added)
+++ subversion/branches/object-model/subversion/bindings/c++/Version.h Thu Sep 16 10:02:14 2010
@@ -0,0 +1,60 @@
+/**
+ * @copyright
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ * @endcopyright
+ *
+ * @file Version.h
+ * @brief Interface of the class Version
+ */
+
+#ifndef VERSION_H
+#define VERSION_H
+
+#include "Version.h"
+
+#include "svn_version.h"
+
+#include <string>
+
+namespace SVN
+{
+
+ class Version
+ {
+ private:
+ int m_major;
+ int m_minor;
+ int m_patch;
+
+ std::string m_tag;
+
+ public:
+ /** The constructor. */
+ Version(const svn_version_t *);
+
+ /** Return the version. */
+ std::string getTag();
+
+ /** The destructor needs to be public. */
+ virtual ~Version();
+ };
+}
+
+#endif // VERSION_H
Propchange: subversion/branches/object-model/subversion/bindings/c++/Version.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: subversion/branches/object-model/subversion/tests/libsvn++/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Sep 16 10:02:14 2010
@@ -1,2 +1,3 @@
.libs
+client-cpp-test
util-cpp-test
Added: subversion/branches/object-model/subversion/tests/libsvn++/client-test.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/libsvn%2B%2B/client-test.cpp?rev=997670&view=auto
==============================================================================
--- subversion/branches/object-model/subversion/tests/libsvn++/client-test.cpp (added)
+++ subversion/branches/object-model/subversion/tests/libsvn++/client-test.cpp Thu Sep 16 10:02:14 2010
@@ -0,0 +1,49 @@
+/*
+ * util-test.c -- test the libsvn++ utilities
+ *
+ * ====================================================================
+ * 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 "../svn_test.h"
+
+#include "../../bindings/c++/Client.h"
+
+using namespace SVN;
+
+static svn_error_t *
+test_get_version(apr_pool_t *p)
+{
+ Client client;
+
+ Version v = client.getVersion();
+ SVN_TEST_ASSERT(v.getTag() == SVN_VER_NUMTAG);
+
+ return SVN_NO_ERROR;
+}
+
+/* The test table. */
+
+struct svn_test_descriptor_t test_funcs[] =
+ {
+ SVN_TEST_NULL,
+ SVN_TEST_PASS2(test_get_version,
+ "test get client version"),
+ SVN_TEST_NULL
+ };
Propchange: subversion/branches/object-model/subversion/tests/libsvn++/client-test.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Re: svn commit: r997670 - in /subversion/branches/object-model: ./
subversion/bindings/c++/ subversion/tests/libsvn++/
Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Thu, Sep 16, 2010 at 12:10 PM, Bert Huijben <be...@qqmail.nl> wrote:
>
>
>> -----Original Message-----
>> From: hwright@apache.org [mailto:hwright@apache.org]
>> Sent: donderdag 16 september 2010 12:02
>> To: commits@subversion.apache.org
>> Subject: svn commit: r997670 - in /subversion/branches/object-model: ./
>> subversion/bindings/c++/ subversion/tests/libsvn++/
>>
>> Author: hwright
>> Date: Thu Sep 16 10:02:14 2010
>> New Revision: 997670
>>
>> URL: http://svn.apache.org/viewvc?rev=997670&view=rev
>> Log:
>> On the object-model branch:
>> Add the Client test, with a single method to wrap a very simple
>> function.
>>
>> * build.conf
>> (libsvn++): Add the client library as a dependency.
>> (client-cpp-test): New.
>>
>> * subversion/bindings/c++/Client.cpp,
>> subversion/bindings/c++/Client.h,
>> subversion/bindings/c++/Version.cpp,
>> subversion/bindings/c++/Version.h,
>> subversion/tests/libsvn++/client-test.cpp:
>> New.
>>
>> Added:
>> subversion/branches/object-model/subversion/bindings/c++/Client.cpp
>> (with props)
>> subversion/branches/object-model/subversion/bindings/c++/Client.h
>> (with props)
>> subversion/branches/object-
>> model/subversion/bindings/c++/Version.cpp (with props)
>> subversion/branches/object-model/subversion/bindings/c++/Version.h
>> (with props)
>> subversion/branches/object-model/subversion/tests/libsvn++/client-
>> test.cpp (with props)
>> Modified:
>> subversion/branches/object-model/build.conf
>> subversion/branches/object-model/subversion/tests/libsvn++/
>> (props changed)
>>
>> Modified: subversion/branches/object-model/build.conf
>> URL: http://svn.apache.org/viewvc/subversion/branches/object-
>> model/build.conf?rev=997670&r1=997669&r2=997670&view=diff
>> =======================================================================
>> =======
>> --- subversion/branches/object-model/build.conf (original)
>> +++ subversion/branches/object-model/build.conf Thu Sep 16 10:02:14
>> 2010
>> @@ -526,7 +526,7 @@ msvc-static = no
>> description = Subversion C++ bindings
>> type = lib
>> path = subversion/bindings/c++
>> -libs = apr libsvn_subr
>> +libs = apr libsvn_subr libsvn_client
>> sources = *.cpp
>> install = c++-lib
>>
>> @@ -539,6 +539,15 @@ install = test
>> libs = libsvn_test libsvn++
>> link-cmd = $(LINK_CXX)
>>
>> +[client-cpp-test]
>> +description = Subversion C++ client bindings tests
>> +type = exe
>> +path = subversion/tests/libsvn++
>> +sources = client-test.cpp
>> +install = test
>> +libs = libsvn_test libsvn++
>> +link-cmd = $(LINK_CXX)
>> +
>> # --------------------------------------------------------------------
>> --------
>> #
>> # JavaHL targets
>>
>> Added: subversion/branches/object-
>> model/subversion/bindings/c++/Client.cpp
>> URL: http://svn.apache.org/viewvc/subversion/branches/object-
>> model/subversion/bindings/c%2B%2B/Client.cpp?rev=997670&view=auto
>> =======================================================================
>> =======
>> --- subversion/branches/object-model/subversion/bindings/c++/Client.cpp
>> (added)
>> +++ subversion/branches/object-model/subversion/bindings/c++/Client.cpp
>> Thu Sep 16 10:02:14 2010
>> @@ -0,0 +1,43 @@
>> +/**
>> + * @copyright
>> + *
>> ====================================================================
>> + * 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.
>> + *
>> ====================================================================
>> + * @endcopyright
>> + *
>> + */
>> +
>> +#include "Client.h"
>> +
>> +namespace SVN {
>> +
>> +Client::Client()
>> +{
>> +}
>> +
>> +Version
>> +Client::getVersion()
>> +{
>> + return Version(svn_client_version());
>> +}
>> +
>> +Client::~Client()
>> +{
>> +}
>> +
>> +}
>>
>> Propchange: subversion/branches/object-
>> model/subversion/bindings/c++/Client.cpp
>> -----------------------------------------------------------------------
>> -------
>> svn:eol-style = native
>>
>> Added: subversion/branches/object-
>> model/subversion/bindings/c++/Client.h
>> URL: http://svn.apache.org/viewvc/subversion/branches/object-
>> model/subversion/bindings/c%2B%2B/Client.h?rev=997670&view=auto
>> =======================================================================
>> =======
>> --- subversion/branches/object-model/subversion/bindings/c++/Client.h
>> (added)
>> +++ subversion/branches/object-model/subversion/bindings/c++/Client.h
>> Thu Sep 16 10:02:14 2010
>> @@ -0,0 +1,52 @@
>> +/**
>> + * @copyright
>> + *
>> ====================================================================
>> + * 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.
>> + *
>> ====================================================================
>> + * @endcopyright
>> + *
>> + * @file Client.h
>> + * @brief Interface of the class Client
>> + */
>> +
>> +#ifndef CLIENT_H
>> +#define CLIENT_H
>
> If this is going to be some public API, this should be SVN_<something>_CLIENT_H or alike and the name of the file should also be prefixed with 'svn_'
Good point. I'll look at renaming the files, though I'm not sure what
"typical" C++ conventions for such things are.
>> +
>> +#include "Version.h"
>> +
>> +#include "svn_client.h"
>> +
>> +namespace SVN
>> +{
>> +
>> + class Client
>
>
> Same problem. We define it in the SVN namespace here, but the name of the class is far to generic to be sure not to clash with other classes.
>
> SVNClient?
> (SVNVersion?)
In this case, I don't think we need to do so. Users can easily use
the full name of the type, SVN::Client, which is fully unambiguous.
-Hyrum
RE: svn commit: r997670 - in /subversion/branches/object-model: ./ subversion/bindings/c++/ subversion/tests/libsvn++/
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: hwright@apache.org [mailto:hwright@apache.org]
> Sent: donderdag 16 september 2010 12:02
> To: commits@subversion.apache.org
> Subject: svn commit: r997670 - in /subversion/branches/object-model: ./
> subversion/bindings/c++/ subversion/tests/libsvn++/
>
> Author: hwright
> Date: Thu Sep 16 10:02:14 2010
> New Revision: 997670
>
> URL: http://svn.apache.org/viewvc?rev=997670&view=rev
> Log:
> On the object-model branch:
> Add the Client test, with a single method to wrap a very simple
> function.
>
> * build.conf
> (libsvn++): Add the client library as a dependency.
> (client-cpp-test): New.
>
> * subversion/bindings/c++/Client.cpp,
> subversion/bindings/c++/Client.h,
> subversion/bindings/c++/Version.cpp,
> subversion/bindings/c++/Version.h,
> subversion/tests/libsvn++/client-test.cpp:
> New.
>
> Added:
> subversion/branches/object-model/subversion/bindings/c++/Client.cpp
> (with props)
> subversion/branches/object-model/subversion/bindings/c++/Client.h
> (with props)
> subversion/branches/object-
> model/subversion/bindings/c++/Version.cpp (with props)
> subversion/branches/object-model/subversion/bindings/c++/Version.h
> (with props)
> subversion/branches/object-model/subversion/tests/libsvn++/client-
> test.cpp (with props)
> Modified:
> subversion/branches/object-model/build.conf
> subversion/branches/object-model/subversion/tests/libsvn++/
> (props changed)
>
> Modified: subversion/branches/object-model/build.conf
> URL: http://svn.apache.org/viewvc/subversion/branches/object-
> model/build.conf?rev=997670&r1=997669&r2=997670&view=diff
> =======================================================================
> =======
> --- subversion/branches/object-model/build.conf (original)
> +++ subversion/branches/object-model/build.conf Thu Sep 16 10:02:14
> 2010
> @@ -526,7 +526,7 @@ msvc-static = no
> description = Subversion C++ bindings
> type = lib
> path = subversion/bindings/c++
> -libs = apr libsvn_subr
> +libs = apr libsvn_subr libsvn_client
> sources = *.cpp
> install = c++-lib
>
> @@ -539,6 +539,15 @@ install = test
> libs = libsvn_test libsvn++
> link-cmd = $(LINK_CXX)
>
> +[client-cpp-test]
> +description = Subversion C++ client bindings tests
> +type = exe
> +path = subversion/tests/libsvn++
> +sources = client-test.cpp
> +install = test
> +libs = libsvn_test libsvn++
> +link-cmd = $(LINK_CXX)
> +
> # --------------------------------------------------------------------
> --------
> #
> # JavaHL targets
>
> Added: subversion/branches/object-
> model/subversion/bindings/c++/Client.cpp
> URL: http://svn.apache.org/viewvc/subversion/branches/object-
> model/subversion/bindings/c%2B%2B/Client.cpp?rev=997670&view=auto
> =======================================================================
> =======
> --- subversion/branches/object-model/subversion/bindings/c++/Client.cpp
> (added)
> +++ subversion/branches/object-model/subversion/bindings/c++/Client.cpp
> Thu Sep 16 10:02:14 2010
> @@ -0,0 +1,43 @@
> +/**
> + * @copyright
> + *
> ====================================================================
> + * 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.
> + *
> ====================================================================
> + * @endcopyright
> + *
> + */
> +
> +#include "Client.h"
> +
> +namespace SVN {
> +
> +Client::Client()
> +{
> +}
> +
> +Version
> +Client::getVersion()
> +{
> + return Version(svn_client_version());
> +}
> +
> +Client::~Client()
> +{
> +}
> +
> +}
>
> Propchange: subversion/branches/object-
> model/subversion/bindings/c++/Client.cpp
> -----------------------------------------------------------------------
> -------
> svn:eol-style = native
>
> Added: subversion/branches/object-
> model/subversion/bindings/c++/Client.h
> URL: http://svn.apache.org/viewvc/subversion/branches/object-
> model/subversion/bindings/c%2B%2B/Client.h?rev=997670&view=auto
> =======================================================================
> =======
> --- subversion/branches/object-model/subversion/bindings/c++/Client.h
> (added)
> +++ subversion/branches/object-model/subversion/bindings/c++/Client.h
> Thu Sep 16 10:02:14 2010
> @@ -0,0 +1,52 @@
> +/**
> + * @copyright
> + *
> ====================================================================
> + * 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.
> + *
> ====================================================================
> + * @endcopyright
> + *
> + * @file Client.h
> + * @brief Interface of the class Client
> + */
> +
> +#ifndef CLIENT_H
> +#define CLIENT_H
If this is going to be some public API, this should be SVN_<something>_CLIENT_H or alike and the name of the file should also be prefixed with 'svn_'
> +
> +#include "Version.h"
> +
> +#include "svn_client.h"
> +
> +namespace SVN
> +{
> +
> + class Client
Same problem. We define it in the SVN namespace here, but the name of the class is far to generic to be sure not to clash with other classes.
SVNClient?
(SVNVersion?)
Bert
RE: svn commit: r997670 - in /subversion/branches/object-model: ./ subversion/bindings/c++/ subversion/tests/libsvn++/
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: hwright@apache.org [mailto:hwright@apache.org]
> Sent: donderdag 16 september 2010 12:02
> To: commits@subversion.apache.org
> Subject: svn commit: r997670 - in /subversion/branches/object-model: ./
> subversion/bindings/c++/ subversion/tests/libsvn++/
>
> Author: hwright
> Date: Thu Sep 16 10:02:14 2010
> New Revision: 997670
>
> URL: http://svn.apache.org/viewvc?rev=997670&view=rev
> Log:
> On the object-model branch:
> Add the Client test, with a single method to wrap a very simple
> function.
>
> * build.conf
> (libsvn++): Add the client library as a dependency.
> (client-cpp-test): New.
>
> * subversion/bindings/c++/Client.cpp,
> subversion/bindings/c++/Client.h,
> subversion/bindings/c++/Version.cpp,
> subversion/bindings/c++/Version.h,
> subversion/tests/libsvn++/client-test.cpp:
> New.
>
> Added:
> subversion/branches/object-model/subversion/bindings/c++/Client.cpp
> (with props)
> subversion/branches/object-model/subversion/bindings/c++/Client.h
> (with props)
> subversion/branches/object-
> model/subversion/bindings/c++/Version.cpp (with props)
> subversion/branches/object-model/subversion/bindings/c++/Version.h
> (with props)
> subversion/branches/object-model/subversion/tests/libsvn++/client-
> test.cpp (with props)
> Modified:
> subversion/branches/object-model/build.conf
> subversion/branches/object-model/subversion/tests/libsvn++/
> (props changed)
>
> Modified: subversion/branches/object-model/build.conf
> URL: http://svn.apache.org/viewvc/subversion/branches/object-
> model/build.conf?rev=997670&r1=997669&r2=997670&view=diff
> =======================================================================
> =======
> --- subversion/branches/object-model/build.conf (original)
> +++ subversion/branches/object-model/build.conf Thu Sep 16 10:02:14
> 2010
> @@ -526,7 +526,7 @@ msvc-static = no
> description = Subversion C++ bindings
> type = lib
> path = subversion/bindings/c++
> -libs = apr libsvn_subr
> +libs = apr libsvn_subr libsvn_client
> sources = *.cpp
> install = c++-lib
>
> @@ -539,6 +539,15 @@ install = test
> libs = libsvn_test libsvn++
> link-cmd = $(LINK_CXX)
>
> +[client-cpp-test]
> +description = Subversion C++ client bindings tests
> +type = exe
> +path = subversion/tests/libsvn++
> +sources = client-test.cpp
> +install = test
> +libs = libsvn_test libsvn++
> +link-cmd = $(LINK_CXX)
> +
> # --------------------------------------------------------------------
> --------
> #
> # JavaHL targets
>
> Added: subversion/branches/object-
> model/subversion/bindings/c++/Client.cpp
> URL: http://svn.apache.org/viewvc/subversion/branches/object-
> model/subversion/bindings/c%2B%2B/Client.cpp?rev=997670&view=auto
> =======================================================================
> =======
> --- subversion/branches/object-model/subversion/bindings/c++/Client.cpp
> (added)
> +++ subversion/branches/object-model/subversion/bindings/c++/Client.cpp
> Thu Sep 16 10:02:14 2010
> @@ -0,0 +1,43 @@
> +/**
> + * @copyright
> + *
> ====================================================================
> + * 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.
> + *
> ====================================================================
> + * @endcopyright
> + *
> + */
> +
> +#include "Client.h"
> +
> +namespace SVN {
> +
> +Client::Client()
> +{
> +}
> +
> +Version
> +Client::getVersion()
> +{
> + return Version(svn_client_version());
> +}
> +
> +Client::~Client()
> +{
> +}
> +
> +}
>
> Propchange: subversion/branches/object-
> model/subversion/bindings/c++/Client.cpp
> -----------------------------------------------------------------------
> -------
> svn:eol-style = native
>
> Added: subversion/branches/object-
> model/subversion/bindings/c++/Client.h
> URL: http://svn.apache.org/viewvc/subversion/branches/object-
> model/subversion/bindings/c%2B%2B/Client.h?rev=997670&view=auto
> =======================================================================
> =======
> --- subversion/branches/object-model/subversion/bindings/c++/Client.h
> (added)
> +++ subversion/branches/object-model/subversion/bindings/c++/Client.h
> Thu Sep 16 10:02:14 2010
> @@ -0,0 +1,52 @@
> +/**
> + * @copyright
> + *
> ====================================================================
> + * 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.
> + *
> ====================================================================
> + * @endcopyright
> + *
> + * @file Client.h
> + * @brief Interface of the class Client
> + */
> +
> +#ifndef CLIENT_H
> +#define CLIENT_H
If this is going to be some public API, this should be SVN_<something>_CLIENT_H or alike and the name of the file should also be prefixed with 'svn_'
> +
> +#include "Version.h"
> +
> +#include "svn_client.h"
> +
> +namespace SVN
> +{
> +
> + class Client
Same problem. We define it in the SVN namespace here, but the name of the class is far to generic to be sure not to clash with other classes.
SVNClient?
(SVNVersion?)
Bert