/*!
 * \file      ng_nas_codec_factory.hh
 * \brief     Header file for NG_NAS protocol codec_gen factory.
 * \author    ETSI TTF041
 * \copyright ETSI Copyright Notification
 *            No part may be reproduced except as authorized by written permission.
 *            The copyright and the foregoing restriction extend to reproduction in all media.
 *            All rights reserved.
 * \version   0.1
 */
#pragma once

#include "codec_stack_builder.hh"
#include "ng_nas_codec.hh"

class Record_Type; //! TITAN forward declaration

/*!
 * \class ng_nas_codec_factory
 * \brief  This class provides a factory class to create an ng_nas_codec class instance
 */
class ng_nas_codec_factory: public codec_factory {
  static ng_nas_codec_factory _f; //! Reference to the unique instance of this class
public: //! \publicsection
  /*!
   * \brief Default constructor
   *        Create a new instance of the ng_nas_codec_factory class
   * \remark The 
   */
  ng_nas_codec_factory() {
    // register factory
    codec_stack_builder::register_codec_factory("ng_nas_codec", this);
  };
  /*!
   * \fn codec_gen* create_codec(const std::string & type, const std::string & param);
   * \brief  Create the codecs stack based on the provided codecs stack description
   * \param[in] p_type The provided codecs stack description
   * \param[in] p_params Optional parameters
   * \return 0 on success, -1 otherwise
   * \inline
   */
  inline virtual codec_gen<Record_Type, Record_Type>* create_codec() {
    return (codec_gen<Record_Type, Record_Type>*)new ng_nas_codec();
  };
}; // End of class ng_nas_codec_factory
