carnold 2005/01/03 20:57:41
Modified: . build.xml
include/log4cxx ndc.h
include/log4cxx/config propertysetter.h
mock sstream
src ndc.cpp
Added: mock stack
Log:
LOGCXX-47: Effective C++ update
Revision Changes Path
1.13 +1 -0 logging-log4cxx/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/logging-log4cxx/build.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- build.xml 18 Dec 2004 08:28:28 -0000 1.12
+++ build.xml 4 Jan 2005 04:57:40 -0000 1.13
@@ -233,6 +233,7 @@
<fileset dir="${build.dir}/header-check"
includes="**/*.cpp"/>
<includepath path="mock"/>
<includepath path="include"/>
+ <includepath path="${apr.include.dir}"/>
<project outfile="${build.dir}/header-check/header-check"
type="cbuilderx" if="gen-cbx"/>
</cc>
1.11 +3 -0 logging-log4cxx/include/log4cxx/ndc.h
Index: ndc.h
===================================================================
RCS file: /home/cvs/logging-log4cxx/include/log4cxx/ndc.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ndc.h 4 Jan 2005 03:37:07 -0000 1.10
+++ ndc.h 4 Jan 2005 04:57:41 -0000 1.11
@@ -104,6 +104,9 @@
DiagnosticContext(const LogString& message,
const DiagnosticContext * parent);
+ virtual ~DiagnosticContext();
+ DiagnosticContext(const DiagnosticContext& src);
+ DiagnosticContext& operator=(const
DiagnosticContext& src);
};
public:
1.15 +1 -0 logging-log4cxx/include/log4cxx/config/propertysetter.h
Index: propertysetter.h
===================================================================
RCS file: /home/cvs/logging-log4cxx/include/log4cxx/config/propertysetter.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- propertysetter.h 26 Dec 2004 07:31:52 -0000 1.14
+++ propertysetter.h 4 Jan 2005 04:57:41 -0000 1.15
@@ -28,6 +28,7 @@
typedef ObjectPtrT<Object> ObjectPtr;
class Properties;
+ class Pool;
}
namespace config
1.2 +8 -3 logging-log4cxx/mock/sstream
Index: sstream
===================================================================
RCS file: /home/cvs/logging-log4cxx/mock/sstream,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sstream 15 Dec 2004 00:15:20 -0000 1.1
+++ sstream 4 Jan 2005 04:57:41 -0000 1.2
@@ -1,5 +1,5 @@
/*
- * Copyright 2004 The Apache Software Foundation.
+ * Copyright 2004-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,9 +38,14 @@
size_t flags() const { return 0; }
};
+ template<class Char, class Traits>
+ class basic_ios : public ios_base {
+ public:
+ void init(void*);
+ };
- template<class Char, class Traitsc>
- class basic_ostream : public ios_base {
+ template<class Char, class Traits>
+ class basic_ostream : public basic_ios<Char, Traits> {
public:
};
1.1 logging-log4cxx/mock/stack
Index: stack
===================================================================
/*
* Copyright 2005 The Apache Software Foundation.
*
* Licensed 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.
*/
/**
*
* Mock version of STL <set> to allow -Weffc++ to successfully complete.
* With regular version of STL will complain about missing virtual destructors
* in template generated code.
*
*/
#ifndef _LOG4CXX_MOCK_STL_STACK_
#define _LOG4CXX_MOCK_STL_STACK_
namespace std {
template <class T> class stack {
public:
stack() {}
};
}
#endif
1.9 +14 -0 logging-log4cxx/src/ndc.cpp
Index: ndc.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/src/ndc.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ndc.cpp 4 Jan 2005 03:37:07 -0000 1.8
+++ ndc.cpp 4 Jan 2005 04:57:41 -0000 1.9
@@ -32,6 +32,20 @@
}
}
+NDC::DiagnosticContext::~DiagnosticContext() {
+}
+
+NDC::DiagnosticContext::DiagnosticContext(const DiagnosticContext& src)
+ : message(src.message), fullMessage(src.fullMessage) {
+}
+
+NDC::DiagnosticContext& NDC::DiagnosticContext::operator=(
+ const DiagnosticContext& src)
+{
+ message.assign(src.message);
+ fullMessage.assign(src.fullMessage);
+}
+
NDC::NDC(const LogString& message)
{
push(message);