<commit_before>/*
 * =====================================================================================
 *
 *       Filename:  TGM_Array.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  05/07/2012 04:23:10 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  <NAME> (), 
 *        Company:  
 *
 * =====================================================================================
 */

#ifndef  TGM_ARRAY_H
#define  TGM_ARRAY_H

#include <iostream>
#include <cstdlib>

namespace Tangram
{
    typedef int (*CompareFunc)(const void* a, const void* b);

    template <class T> class Array
    {

        public:
            Array();
            ~Array();

            inline void Init(unsigned int capacity);
            inline void MemSet(int value);
            inline void InitToEnd(void);

            void ResizeNoCopy(unsigned int newCap);
            void Resize(unsigned int newCap);

            inline void Increment(void);
            inline void SetSize(unsigned int newSize);
            inline void Clear(void);

            inline T* GetPointer(unsigned int);
            inline T& operator[](unsigned int i);
<commit_msg>Adding <string.h> in TangramDetect/TGM_Array.h<commit_after>/*
 * =====================================================================================
 *
 *       Filename:  TGM_Array.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  05/07/2012 04:23:10 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  <NAME> (), 
 *        Company:  
 *
 * =====================================================================================
 */

#ifndef  TGM_ARRAY_H
#define  TGM_ARRAY_H

#include <string.h>
#include <iostream>
#include <cstdlib>

namespace Tangram
{
    typedef int (*CompareFunc)(const void* a, const void* b);

    template <class T> class Array
    {

        public:
            Array();
            ~Array();

            inline void Init(unsigned int capacity);
            inline void MemSet(int value);
            inline void InitToEnd(void);

            void ResizeNoCopy(unsigned int newCap);
            void Resize(unsigned int newCap);

            inline void Increment(void);
            inline void SetSize(unsigned int newSize);
            inline void Clear(void);

            inline T* GetPointer(unsigned int);
            inline T& operator[](unsigned int i);

{'fraction_non_alphanumeric': 0.22950144210960033, 'fraction_numerical': 0.013185002060156572, 'mean_word_length': 2.3079019073569484, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '6412562', 'n_tokens_mistral': 686, 'n_tokens_neox': 616, 'n_words': 171}