header cleanup

This commit is contained in:
Matej Sekoranja
2011-10-20 15:40:53 +02:00
parent 4e22433de1
commit 8464aacbef
36 changed files with 182 additions and 183 deletions

View File

@@ -17,15 +17,14 @@ INC += hexDump.h
INC += inetAddressUtil.h
INC += logger.h
INC += introspectionRegistry.h
INC += transportRegistry.h
INC += namedLockPattern.h
INC += referenceCountingLock.h
INC += configuration.h
INC += likely.h
LIBSRCS += hexDump.cpp
LIBSRCS += inetAddressUtil.cpp
LIBSRCS += logger.cpp
LIBSRCS += introspectionRegistry.cpp
LIBSRCS += transportRegistry.cpp
LIBSRCS += configuration.cpp
LIBSRCS += referenceCountingLock.cpp
@@ -58,6 +57,7 @@ INC += blockingUDP.h
INC += beaconHandler.h
INC += blockingTCP.h
INC += channelSearchManager.h
INC += transportRegistry.h
LIBSRCS += blockingUDPTransport.cpp
LIBSRCS += blockingUDPConnector.cpp
LIBSRCS += beaconHandler.cpp
@@ -68,7 +68,7 @@ LIBSRCS += blockingServerTCPTransport.cpp
LIBSRCS += channelSearchManager.cpp
LIBSRCS += abstractResponseHandler.cpp
LIBSRCS += blockingTCPAcceptor.cpp
LIBSRCS += transportRegistry.cpp
SRC_DIRS += $(PVACCESS)/remoteClient
INC += clientContextImpl.h

View File

@@ -1,12 +1,13 @@
/*pvAccess.cpp*/
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvDataCPP is distributed subject to a Software License Agreement found
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/pvAccess.h>
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
const char* Channel::ConnectionStateNames[] = { "NEVER_CONNECTED", "CONNECTED", "DISCONNECTED", "DESTROYED" };

View File

@@ -1,4 +1,9 @@
/* pvAccess.h */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef PVACCESS_H
#define PVACCESS_H
#include <pv/pvData.h>
@@ -9,7 +14,8 @@
#include <vector>
#include <pv/bitSet.h>
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
enum AccessRights {
/**

View File

@@ -1,4 +1,8 @@
/*ChannelAccessFactory.cpp*/
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/lock.h>
#include <pv/noDefaultMethods.h>
@@ -10,7 +14,8 @@
using namespace epics::pvData;
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
static ChannelAccess::shared_pointer channelAccess;

View File

@@ -1,9 +1,9 @@
/*CreateRequestFactory.cpp*/
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* EPICS pvDataCPP is distributed subject to a Software License Agreement found
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <string>
#include <sstream>
#include <pv/pvData.h>
@@ -13,7 +13,8 @@
using namespace epics::pvData;
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
class CreateRequestImpl : public CreateRequest {
private:

View File

@@ -1,8 +1,7 @@
/*
* abstractResponseHandler.cpp
*
* Created on: Jan 10, 2011
* Author: Miha Vitorovic
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/remote.h>

View File

@@ -1,5 +1,7 @@
/*
* beaconHandler.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/beaconHandler.h>
@@ -9,22 +11,23 @@ using namespace std;
using namespace epics::pvData;
using namespace epics::pvAccess;
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
BeaconHandler::BeaconHandler(Context::shared_pointer context,
const osiSockAddr* responseFrom)
:_context(Context::weak_pointer(context))
,_responseFrom(*responseFrom)
,_mutex()
,_serverStartupTime(0)
const osiSockAddr* responseFrom) :
_context(Context::weak_pointer(context)),
_responseFrom(*responseFrom),
_mutex(),
_serverStartupTime(0)
{
}
BeaconHandler::BeaconHandler(const osiSockAddr* responseFrom)
:_responseFrom(*responseFrom)
,_mutex()
, _serverStartupTime(0)
BeaconHandler::BeaconHandler(const osiSockAddr* responseFrom) :
_responseFrom(*responseFrom),
_mutex(),
_serverStartupTime(0)
{
}

View File

@@ -1,5 +1,7 @@
/*
* beaconHandler.h
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef BEACONHANDLER_H
@@ -12,7 +14,8 @@
#include <osiSock.h>
#include <pv/lock.h>
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
/**
* BeaconHandler

View File

@@ -1,22 +1,15 @@
/*
* BlockingClientTCPTransport.cpp
*
* Created on: Jan 3, 2011
* Author: Miha Vitorovic
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/* pvAccess */
#include <pv/blockingTCP.h>
#include <pv/introspectionRegistry.h>
#include <pv/logger.h>
/* pvData */
#include <pv/lock.h>
/* EPICSv3 */
#include <logger.h>
/* standard */
#include <set>
#include <epicsTime.h>
#include <sstream>

View File

@@ -1,21 +1,16 @@
/*
* blockingServerTCPTransport.cpp
*
* Created on: Jan 4, 2011
* Author: Miha Vitorovic
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/* pvAccess */
#include <pv/blockingTCP.h>
#include <pv/remote.h>
#include <pv/logger.h>
/* pvData */
#include <pv/lock.h>
#include <pv/byteBuffer.h>
/* EPICSv3 */
#include <logger.h>
/* standard */
#include <map>
@@ -23,7 +18,7 @@ using namespace epics::pvData;
using namespace std;
namespace epics {
namespace pvAccess {
namespace pvAccess {
BlockingServerTCPTransport::BlockingServerTCPTransport(
Context::shared_pointer const & context, SOCKET channel,

View File

@@ -1,14 +1,12 @@
/*
* blockingTCP.h
*
* Created on: Dec 29, 2010
* Author: Miha Vitorovic
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef BLOCKINGTCP_H_
#define BLOCKINGTCP_H_
/* pvAccess */
#include <pv/caConstants.h>
#include <pv/remote.h>
#include <pv/transportRegistry.h>
@@ -16,20 +14,17 @@
#include <pv/namedLockPattern.h>
#include <pv/inetAddressUtil.h>
/* pvData */
#include <pv/byteBuffer.h>
#include <pv/pvType.h>
#include <pv/lock.h>
#include <pv/timer.h>
#include <pv/event.h>
/* EPICSv3 */
#include <osdSock.h>
#include <osiSock.h>
#include <epicsTime.h>
#include <epicsThread.h>
/* standard */
#include <set>
#include <map>
#include <deque>

View File

@@ -1,27 +1,25 @@
/*
* blockingTCPAcceptor.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/* pvAccess */
#include <pv/blockingTCP.h>
#include <pv/remote.h>
#include <pv/logger.h>
/* pvData */
#include <pv/epicsException.h>
/* EPICSv3 */
#include <logger.h>
#include <osiSock.h>
#include <epicsThread.h>
/* standard */
#include <sstream>
using std::ostringstream;
using namespace epics::pvData;
namespace epics {
namespace pvAccess {
namespace pvAccess {
BlockingTCPAcceptor::BlockingTCPAcceptor(
Context::shared_pointer const & context,

View File

@@ -1,17 +1,16 @@
/*
* blockingTCPConnector.cpp
*
* Created on: Jan 4, 2011
* Author: Miha Vitorovic
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/blockingTCP.h>
#include <pv/remote.h>
#include <pv/namedLockPattern.h>
#include <pv/logger.h>
#include <epicsThread.h>
#include <osiSock.h>
#include <logger.h>
#include <sys/types.h>
#include <sstream>

View File

@@ -1,28 +1,27 @@
/*
* blockingTCPTransport.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#define __STDC_LIMIT_MACROS 1
#include <pv/blockingTCP.h>
#include <pv/inetAddressUtil.h>
#include <pv/caConstants.h>
#include <pv/CDRMonitor.h>
#include <pv/logger.h>
#include <pv/hexDump.h>
#include <pv/likely.h>
/* pvData */
#include <pv/lock.h>
#include <pv/byteBuffer.h>
#include <pv/epicsException.h>
#include <pv/noDefaultMethods.h>
#include <pv/CDRMonitor.h>
/* EPICSv3 */
#include <osdSock.h>
#include <osiSock.h>
#include <epicsThread.h>
#include <logger.h>
#include <pv/hexDump.h>
/* standard */
#include <sys/types.h>
#include <algorithm>
#include <sstream>
@@ -39,17 +38,8 @@ using std::max;
using std::min;
using std::ostringstream;
// TODO moved to some compiler_utils.h?
#if defined(__GNUC__)
#define likely(x) __builtin_expect (x, 1)
#define unlikely(x) __builtin_expect (x, 0)
#else
#define likely(x) (x)
#define unlikely(x) (x)
#endif
namespace epics {
namespace pvAccess {
namespace pvAccess {
/*
class MonitorSender : public TransportSender, public NoDefaultMethods {

View File

@@ -1,25 +1,21 @@
/*
* blockingUDPTransport.h
*
* Created on: Dec 20, 2010
* Author: Miha Vitorovic
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef BLOCKINGUDP_H_
#define BLOCKINGUDP_H_
/* pvAccess */
#include <pv/remote.h>
#include <pv/caConstants.h>
#include <pv/inetAddressUtil.h>
/* pvData */
#include <pv/noDefaultMethods.h>
#include <pv/byteBuffer.h>
#include <pv/lock.h>
#include <pv/event.h>
/* EPICSv3 */
#include <osdSock.h>
#include <osiSock.h>
#include <epicsThread.h>

View File

@@ -1,19 +1,15 @@
/*
* blockingUDPConnector.cpp
*
* Created on: Dec 27, 2010
* Author: Miha Vitorovic
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/* pvAccess */
#include <pv/blockingUDP.h>
#include <pv/remote.h>
#include <pv/logger.h>
/* EPICSv3 */
#include <logger.h>
#include <osiSock.h>
/* standard */
#include <sys/types.h>
using namespace std;

View File

@@ -1,40 +1,29 @@
/*
* blockingUDPTransport.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
/* pvAccess */
#include <pv/blockingUDP.h>
#include <pv/caConstants.h>
#include <pv/inetAddressUtil.h>
#include <pv/logger.h>
#include <pv/likely.h>
/* pvData */
#include <pv/byteBuffer.h>
#include <pv/lock.h>
#include <pv/CDRMonitor.h>
/* EPICSv3 */
#include <osdSock.h>
#include <osiSock.h>
#include <logger.h>
#include <epicsThread.h>
/* standard */
#include <cstdio>
#include <sys/types.h>
using namespace epics::pvData;
using namespace std;
// TODO moved to some compiler_utils.h?
#if defined(__GNUC__)
#define likely(x) __builtin_expect (x, 1)
#define unlikely(x) __builtin_expect (x, 0)
#else
#define likely(x) (x)
#define unlikely(x) (x)
#endif
namespace epics {
namespace pvAccess {

View File

@@ -1,5 +1,7 @@
/*
* channelSearchManager.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/channelSearchManager.h>

View File

@@ -1,7 +1,9 @@
/*
* channelSearchManager.h
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef CHANNELSEARCHMANAGER_H
#define CHANNELSEARCHMANAGER_H

View File

@@ -1,8 +1,7 @@
/*
* remote.h
*
* Created on: Dec 21, 2010
* Author: user
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef REMOTE_H_

View File

@@ -1,8 +1,8 @@
/* clientClientContextImpl.cpp */
/* Author: Matej Sekoranja Date: 2011.1.1 */
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/pvAccess.h>
#include <iostream>

View File

@@ -1,8 +1,7 @@
/*
* clientContext.h
*
* Created on: Dec 21, 2010
* Author: msekoran
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef CLIENTCONTEXTIMPL_H_

View File

@@ -1,12 +1,15 @@
/*
* baseChannelRequester.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/baseChannelRequester.h>
using namespace epics::pvData;
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
const Status BaseChannelRequester::okStatus = Status();
const Status BaseChannelRequester::badCIDStatus = Status(Status::STATUSTYPE_ERROR, "bad channel id");

View File

@@ -1,5 +1,7 @@
/*
* baseChannelRequester.h
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef BASECHANNELREQUESTER_H_

View File

@@ -1,5 +1,7 @@
/*
* beaconEmitter.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifdef _WIN32

View File

@@ -1,5 +1,7 @@
/*
* beaconEmitter.h
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef BEACONEMITTER_H

View File

@@ -1,5 +1,7 @@
/*
* beaconServerStatusProvider.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/beaconServerStatusProvider.h>
@@ -7,7 +9,8 @@
using namespace epics::pvData;
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
DefaultBeaconServerStatusProvider::DefaultBeaconServerStatusProvider(ServerContext::shared_pointer const & context): _context(context)
{

View File

@@ -1,5 +1,7 @@
/*
* beaconServerStatusProvider.h
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef BEACONSERVERSTATUSPROVIDER_H
@@ -9,7 +11,8 @@
//#include <pv/serverContext.h>
#include <pv/sharedPtr.h>
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
class ServerContext;

View File

@@ -1,5 +1,7 @@
/*
* responseHandlers.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/responseHandlers.h>

View File

@@ -1,5 +1,7 @@
/*
* responseHandlers.h
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef RESPONSEHANDLERS_H_
@@ -11,7 +13,7 @@
#include <pv/baseChannelRequester.h>
namespace epics {
namespace pvAccess {
namespace pvAccess {
/**
*/

View File

@@ -1,12 +1,15 @@
/*
* serverChannelImpl.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/serverChannelImpl.h>
using namespace epics::pvData;
namespace epics { namespace pvAccess {
namespace epics {
namespace pvAccess {
ServerChannelImpl::ServerChannelImpl(Channel::shared_pointer const & channel, pvAccessID cid, pvAccessID sid, epics::pvData::PVField::shared_pointer const & securityToken):
_channel(channel),

View File

@@ -1,5 +1,7 @@
/*
* serverChannel.h
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef SERVERCHANNEL_H_

View File

@@ -1,5 +1,7 @@
/*
* serverContext.cpp
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#include <pv/serverContext.h>

View File

@@ -1,5 +1,7 @@
/*
* serverContext.h
/**
* Copyright - See the COPYRIGHT that is included with this distribution.
* pvAccessCPP is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
*/
#ifndef SERVERCONTEXT_H_