<commit_before>/* 
 * Author: <NAME>
 *
 * BSD license, See the LICENSE file for more information.
 */

#ifndef NDN_NAME_HPP
#define	NDN_NAME_HPP

#include <vector>
#include <string>
#include "common.h"
#include "c/Name.h"
#include "encoding/BinaryXMLWireFormat.hpp"

namespace ndn {
  
class NameComponent {
public:
  NameComponent() 
  {    
  }
  
  NameComponent(unsigned char * value, unsigned int valueLen) 
  : value_(value, value + valueLen)
  {
  }
  
  /**
   * Set the componentStruct to point to this component, without copying any memory.
   * WARNING: The resulting pointer in componentStruct is invalid after a further use of this object which could reallocate memory.
   * @param componentStruct the C ndn_NameComponent struct to receive the pointer.
   */
  void get(struct ndn_NameComponent &componentStruct) 
  {
    componentStruct.value = &value_[0];
    componentStruct.valueLength = value_.size(); 
  }
  
  /**<commit_msg>Don't need to include "common.h"<commit_after>/* 
 * Author: <NAME>
 *
 * BSD license, See the LICENSE file for more information.
 */

#ifndef NDN_NAME_HPP
#define	NDN_NAME_HPP

#include <vector>
#include <string>
#include "c/Name.h"
#include "encoding/BinaryXMLWireFormat.hpp"

namespace ndn {
  
class NameComponent {
public:
  NameComponent() 
  {    
  }
  
  NameComponent(unsigned char * value, unsigned int valueLen) 
  : value_(value, value + valueLen)
  {
  }
  
  /**
   * Set the componentStruct to point to this component, without copying any memory.
   * WARNING: The resulting pointer in componentStruct is invalid after a further use of this object which could reallocate memory.
   * @param componentStruct the C ndn_NameComponent struct to receive the pointer.
   */
  void get(struct ndn_NameComponent &componentStruct) 
  {
    componentStruct.value = &value_[0];
    componentStruct.valueLength = value_.size(); 
  }
  
  /**
{'fraction_non_alphanumeric': 0.09413008989952407, 'fraction_numerical': 0.0010576414595452142, 'mean_word_length': 3.6716049382716047, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '606814', 'n_tokens_mistral': 589, 'n_tokens_neox': 567, 'n_words': 182}