merge
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
* EPICS pvDataCPP is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
#include <pv/pvData.h>
|
||||
#include <pv/pvIntrospect.h>
|
||||
#include <pv/convert.h>
|
||||
@@ -150,9 +151,9 @@ namespace epics { namespace pvData {
|
||||
throw std::logic_error("Number of fields must be >=0");
|
||||
|
||||
Structure::shared_pointer structure = const_pointer_cast<Structure>(getStructure());
|
||||
FieldConstPtr fields[numberNewFields];
|
||||
std::vector<FieldConstPtr> fields(numberNewFields);
|
||||
for(int i=0; i<numberNewFields; i++) fields[i] = pvFields[i]->getField();
|
||||
structure->appendFields(numberNewFields,fields);
|
||||
structure->appendFields(numberNewFields,&fields[0]);
|
||||
int origLength = pImpl->numberFields;
|
||||
PVFieldPtrArray oldPVFields = pImpl->pvFields;
|
||||
int numberFields = origLength + numberNewFields;
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
#include <pv/linkedList.h>
|
||||
#include <pv/CDRMonitor.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <BaseTsd.h>
|
||||
typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
namespace epics { namespace pvData {
|
||||
|
||||
static
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
# include <cxxabi.h>
|
||||
# define EXCEPT_USE_BACKTRACE
|
||||
#elif defined(_WIN32) && !defined(__MINGW__) && !defined(SKIP_DBGHELP)
|
||||
# define _WINSOCKAPI_
|
||||
# include <windows.h>
|
||||
# include <dbghelp.h>
|
||||
# define EXCEPT_USE_CAPTURE
|
||||
@@ -84,7 +85,7 @@ public:
|
||||
}
|
||||
#elif defined(EXCEPT_USE_CAPTURE)
|
||||
{
|
||||
m_depth=CaptureStackBackTrace(0,EXCEPT_DEPTH.m_stack,0);
|
||||
m_depth=CaptureStackBackTrace(0,EXCEPT_DEPTH,m_stack,0);
|
||||
}
|
||||
#else
|
||||
{}
|
||||
@@ -141,7 +142,7 @@ namespace detail {
|
||||
std::string
|
||||
showException(const E& ex)
|
||||
{
|
||||
ExceptionMixin *mx=dynamic_cast<ExceptionMixin*>(&ex);
|
||||
const ExceptionMixin *mx=dynamic_cast<const ExceptionMixin*>(&ex);
|
||||
if(!mx) return std::string();
|
||||
return mx->show();
|
||||
}
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
# define SHARED_FROM_BOOST
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER>=1600)
|
||||
// MSVC 2010 has it in <memory>
|
||||
# undef SHARED_FROM_BOOST
|
||||
# undef SHARED_FROM_TR1
|
||||
#endif
|
||||
|
||||
// go and get it
|
||||
|
||||
#if defined(SHARED_FROM_TR1)
|
||||
|
||||
@@ -7,23 +7,10 @@
|
||||
#include <pv/noDefaultMethods.h>
|
||||
#include <pv/pvType.h>
|
||||
#include <pv/timeStamp.h>
|
||||
#include <pv/timeFunction.h>
|
||||
|
||||
namespace epics { namespace pvData {
|
||||
|
||||
class TimeFunctionRequester {
|
||||
public:
|
||||
virtual void function() = 0;
|
||||
};
|
||||
|
||||
class TimeFunction : private NoDefaultMethods {
|
||||
public:
|
||||
TimeFunction(TimeFunctionRequester *requester);
|
||||
~TimeFunction();
|
||||
double timeCall();
|
||||
private:
|
||||
TimeFunctionRequester *requester;
|
||||
};
|
||||
|
||||
TimeFunction::TimeFunction(TimeFunctionRequester *requester)
|
||||
: requester(requester) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user