<commit_before>#ifndef __STDAIR_BOM_PRINTBOMCONTENT_HPP
#define __STDAIR_BOM_PRINTBOMCONTENT_HPP

// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
// C
#include <assert.h>
// MPL
#include <boost/mpl/size.hpp>
#include <boost/mpl/at.hpp>
// STDAIR
#include <stdair/bom/BomChildrenHolder.hpp>

namespace stdair {
  
  /** .*/
  class PrintBomContent {

  public:
    /** Dump a BomContent object into an output stream.*/
    template <typename BOM_STRUCTURE>
    static void printContent (const BOM_STRUCTURE& ioBomStructure,
                              std::ostringstream& ioStr, unsigned short& ioIdx) {
      // Type for the list of children bom holders
      typedef typename BOM_STRUCTURE::ChildrenBomList_T CHILDREN_BOM_LIST_T;

      // Type for the list of children bom types
      typedef typename BOM_STRUCTURE::ChildrenBomTypeList_T CHILDREN_BOM_TYPE_LIST_T;
      
      // Retrive the list of children holders.
      const CHILDREN_BOM_LIST_T& lBomStructureList =
        ioBomStructure.getChildrenList();

      // Get the number of children types
      const int lNbOfTypes =
        boost::mpl::size <CHILDREN_BOM_TYPE_LIST_T>::type::value;
      
      if (lNbOfTypes > 0) {
        // Type for the first children type
        typedef typename boost::mpl::at_c<CHILDREN_BOM_TYPE_LIST_T,0>::type
          FIRST_CHILDREN_TYPE_T;

        // Type for the holder of children of the first type
        typedef BomChildrenHolder<FIRST_CHILDREN_TYPE_T> FIRST_CHILDREN_HOLDER_T;

        FIRST_CHILDREN_HOLDER_T* lFirstChildrenHolder_ptr =
          dynamic_cast<FIRST_CHILDREN_HOLDER_T*> (lBomStructureList.at(0));
        assert (lFirstChildrenHolder_ptr != NULL);


      if (lNbOfTypes > 1) {

      }
    }
  };

}
#endif // __STDAIR_BOM_PRINTBOMCONTENT_HPP

<commit_msg>[STDAIR] Fixed a typo in the PrintBomContent helper class.<commit_after>#ifndef __STDAIR_BOM_PRINTBOMCONTENT_HPP
#define __STDAIR_BOM_PRINTBOMCONTENT_HPP

// //////////////////////////////////////////////////////////////////////
// Import section
// //////////////////////////////////////////////////////////////////////
// C
#include <assert.h>
// MPL
#include <boost/mpl/size.hpp>
#include <boost/mpl/at.hpp>
// STDAIR
#include <stdair/bom/BomChildrenHolder.hpp>

namespace stdair {
  
  /** Helper class for pretty printing the Business (BOM) objects. */
  class PrintBomContent {
  public:
    /** Dump a BomContent object into an output stream.*/
    template <typename BOM_STRUCTURE>
    static void printContent (const BOM_STRUCTURE& ioBomStructure,
                              std::ostringstream& ioStr, unsigned short& ioIdx) {
      // Type for the list of children bom holders
      typedef typename BOM_STRUCTURE::ChildrenBomList_T CHILDREN_BOM_LIST_T;

      // Type for the list of children bom types
      typedef typename BOM_STRUCTURE::ChildrenBomTypeList_T CHILDREN_BOM_TYPE_LIST_T;
      
      // Retrive the list of children holders.
      const CHILDREN_BOM_LIST_T& lBomStructureList =
        ioBomStructure.getChildrenList();

      // Get the number of children types
      const int lNbOfTypes =
        boost::mpl::size <CHILDREN_BOM_TYPE_LIST_T>::type::value;
      
      if (lNbOfTypes > 0) {
        // Type for the first children type
        typedef typename boost::mpl::at_c<CHILDREN_BOM_TYPE_LIST_T,0>::type
          FIRST_CHILDREN_TYPE_T;

        // Type for the holder of children of the first type
        typedef BomChildrenHolder<FIRST_CHILDREN_TYPE_T> FIRST_CHILDREN_HOLDER_T;

        FIRST_CHILDREN_HOLDER_T* lFirstChildrenHolder_ptr =
          dynamic_cast<FIRST_CHILDREN_HOLDER_T*> (lBomStructureList.at(0));
        assert (lFirstChildrenHolder_ptr != NULL);


        if (lNbOfTypes > 1) {

        }
      }
    }
    
  };

}
#endif // __STDAIR_BOM_PRINTBOMCONTENT_HPP


{'fraction_non_alphanumeric': 0.14820473644003057, 'fraction_numerical': 0.002037178507766743, 'mean_word_length': 2.3008403361344536, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6424674', 'n_tokens_mistral': 1291, 'n_tokens_neox': 1232, 'n_words': 271}