#pragma once
#ifndef CProcessorConfigurationItem_h
#define CProcessorConfigurationItem_h
#pragma warning( disable : 4251 )
#define _CRT_SECURE_NO_DEPRECATE
#include <string>
#include "FWCoreDLLImportExportDeclaration.h"
namespace CoreFW
{
typedef enum _EnumMessageProcessorCreationType
{
MSG_PROCESSOR_CREATE_FROM_POOL = 0,
MSG_PROCESSOR_CREATE_NEW = 1,
MSG_PROCESSOR_CREATE_FROM_PARENT = 2,
} EnumMessageProcessorCreationType ;
typedef enum _EnumMessageProcessorType
{
MSG_PROCESSOR_UNKNOWN = -1,
MSG_PROCESSOR_MAIN = 0,
MSG_PROCESSOR_CALL_FLOW = 1,
MSG_PROCESSOR_LOGGER = 2,
MSG_PROCESSOR_OTHER = 3,
MSG_PROCESSOR_DATABASE = 4,
MSG_PROCESSOR_LOGIC_CONTROL = 5,
MSG_PROCESSOR_STRING = 6,
MSG_PROCESSOR_LIBRARY = 7,
MSG_PROCESSOR_MATH = 8,
MSG_PROCESSOR_PBX = 9,
MSG_PROCESSOR_CHANNEL = 10,
MSG_PROCESSOR_THREAD = 11,
MSG_PROCESSOR_CIQ = 12,
MSG_PROCESSOR_APS = 13,
MSG_PROCESSOR_DATE = 14,
MSG_PROCESSOR_SYSTEM = 15,
MSG_PROCESSOR_LOG = 16,
MSG_PROCESSOR_ALARM = 17,
MSG_PROCESSOR_TELEPHONY = 18,
MSG_PROCESSOR_FAX = 19,
MSG_PROCESSOR_TIMER = 20,
} EnumMessageProcessorType ;
class CORE_DLL_DECLARATION_SPECIFIER CProcessorConfigurationItem
{
public:
CProcessorConfigurationItem() ;
CProcessorConfigurationItem( EnumMessageProcessorType eMessageProcessorType,
const std::string &strMessageProcessorName,
int iNoOfChannelPerProcessor,
EnumMessageProcessorType eAlternateMessageProcessorType,
bool bRuntimeAllocation ) ;
virtual ~CProcessorConfigurationItem() ;
EnumMessageProcessorType GetMessageProcessorType() const ;
void SetMessageProcessorType( EnumMessageProcessorType eMessageProcessorType ) ;
const std::string& GetMessageProcessorName() const ;
void SetMessageProcessorName( const std::string &strMessageProcessorName ) ;
int GetNoOfChannelPerProcessor() const ;
void SetNoOfChannelPerProcessor( int iNoOfChannelPerProcessor ) ;
EnumMessageProcessorType GetAlternateMessageProcessorType() const ;
void SetAlternateMessageProcessorType( EnumMessageProcessorType eAlternateMessageProcessorType ) ;
bool IsRuntimeAllocated() const ;
void SetRuntimeAllocation( bool bRuntimeAllocation ) ;
public:
static std::string GetProcessorTypeString( EnumMessageProcessorType eMessageProcessorType ) ;
static std::string GetProcessorCreationTypeString( EnumMessageProcessorCreationType eMessageProcessorCreationType ) ;
private:
EnumMessageProcessorType m_eMessageProcessorType ;
std::string m_strMessageProcessorName ;
int m_iNoOfChannelPerProcessor ;
EnumMessageProcessorType m_eAlternateMessageProcessorType ;
bool m_bRuntimeAllocation ;
} ;
///////////////////////////////////////////////////////////////////////////////
// inline function definition
//////////////////////////////////////////////////////////////////////////////
inline bool CProcessorConfigurationItem::IsRuntimeAllocated() const
{
return m_bRuntimeAllocation ;
}
inline void CProcessorConfigurationItem::SetRuntimeAllocation( bool bRuntimeAllocation )
{
m_bRuntimeAllocation = bRuntimeAllocation ;
}
inline const std::string& CProcessorConfigurationItem::GetMessageProcessorName() const
{
return m_strMessageProcessorName ;
}
inline void CProcessorConfigurationItem::SetMessageProcessorName( const std::string &strMessageProcessorName )
{
m_strMessageProcessorName = strMessageProcessorName ;
}
inline EnumMessageProcessorType CProcessorConfigurationItem::GetMessageProcessorType() const
{
return m_eMessageProcessorType ;
}
inline void CProcessorConfigurationItem::SetMessageProcessorType( EnumMessageProcessorType eMessageProcessorType )
{
m_eMessageProcessorType = eMessageProcessorType ;
}
inline int CProcessorConfigurationItem::GetNoOfChannelPerProcessor() const
{
return m_iNoOfChannelPerProcessor ;
}
inline void CProcessorConfigurationItem::SetNoOfChannelPerProcessor( int iNoOfChannelPerProcessor )
{
m_iNoOfChannelPerProcessor = iNoOfChannelPerProcessor ;
}
inline EnumMessageProcessorType CProcessorConfigurationItem::GetAlternateMessageProcessorType() const
{
return m_eAlternateMessageProcessorType ;
}
inline void CProcessorConfigurationItem::SetAlternateMessageProcessorType( EnumMessageProcessorType eAlternateMessageProcessorType )
{
m_eAlternateMessageProcessorType = eAlternateMessageProcessorType ;
}
} // end namespace
#endif