Click here to Skip to main content
15,885,278 members
Articles / Programming Languages / Visual C++ 10.0

SIP Stack (1 of 3)

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
20 Aug 2012CPOL3 min read 30K   1.7K   4  
SIP Stack Implementation on the basis of RFC SIP 3261 Specification
#pragma once

#ifndef CProcessorConfiguration_h
	#define CProcessorConfiguration_h

	//#pragma warning( disable : 4800 )
	//#pragma warning( disable : 4786 )
	
	#include <map>

	#include "FWOS.h"
	#include "CProcessorConfigurationItem.h"
	#include "AConfiguration.h"

	namespace CoreFW
	{
		typedef std::map< EnumMessageProcessorType, CProcessorConfigurationItem* > TCProcessorConfigurationItemMap ;

		class CORE_DLL_DECLARATION_SPECIFIER CProcessorConfiguration : public AConfiguration
		{
		public:
			CProcessorConfiguration() ;
			virtual ~CProcessorConfiguration() ;

		public:
			int Load( const std::string &strConfigFilePath, bool bReload = false ) ; // bReload not in use
			void Unload() ;
			FW_RETURN_TYPE Save( const std::string &strConfigFilePath ) ;
			int GetSize() const ;

		public:
			int GetNoOfChannelPerProcessor( EnumMessageProcessorType eMessageProcessorType ) const ;
			EnumMessageProcessorType GetAlternateMessageProcessorType( EnumMessageProcessorType eMessageProcessorType ) const ;
			std::string GetMessageProcessorName( EnumMessageProcessorType eMessageProcessorType ) const ;
			bool IsRuntimeAllocated( EnumMessageProcessorType eMessageProcessorType ) const ;

			TCProcessorConfigurationItemMap* GetProcessorConfigurationItemMap() ;
			FW_RETURN_TYPE AddProcessorConfigurationItem( EnumMessageProcessorType eMessageProcessorType, 
													CProcessorConfigurationItem *pProcessorConfigurationItem ) ;

		private:
			FW_RETURN_TYPE WriteStaticDataToFile( std::ofstream &ConfigFile ) ;

		private:
			TCProcessorConfigurationItemMap m_ProcessorConfigurationItemMap ;
		} ;

		inline TCProcessorConfigurationItemMap* CProcessorConfiguration::GetProcessorConfigurationItemMap()
		{
			return &m_ProcessorConfigurationItemMap ;
		}

		inline int CProcessorConfiguration::GetSize() const
		{
			return m_ProcessorConfigurationItemMap.size() ;
		}
		
	} // End namespace
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
India India
Hatim Haidry

VC++, Technical Architect

India

haidryhatim@gmail.com

Comments and Discussions