ONE - On-device Neural Engine
Loading...
Searching...
No Matches
Argv< N > Class Template Reference

#include <TestHelper.h>

Public Types

typedef char * pchar_t
 
typedef char * pchar_t
 

Public Member Functions

 ~Argv ()
 
void add (const char *in)
 
pchar_targv (void)
 
 ~Argv ()
 
void add (const char *in)
 
pchar_targv (void)
 

Detailed Description

template<size_t N>
class Argv< N >

Definition at line 23 of file TestHelper.h.

Member Typedef Documentation

◆ pchar_t [1/2]

template<size_t N>
typedef char* Argv< N >::pchar_t

Definition at line 26 of file TestHelper.h.

◆ pchar_t [2/2]

template<size_t N>
typedef char* Argv< N >::pchar_t

Definition at line 29 of file TestHelper.h.

Constructor & Destructor Documentation

◆ ~Argv() [1/2]

template<size_t N>
Argv< N >::~Argv ( )
inline

Definition at line 29 of file TestHelper.h.

30 {
31 for (size_t n = 0; n < _ptr; ++n)
32 delete _argv[n];
33 }

◆ ~Argv() [2/2]

template<size_t N>
Argv< N >::~Argv ( )
inline

Definition at line 32 of file TestHelper.h.

33 {
34 for (size_t n = 0; n < _ptr; ++n)
35 delete _argv[n];
36 }

Member Function Documentation

◆ add() [1/2]

template<size_t N>
void Argv< N >::add ( const char *  in)
inline

Definition at line 35 of file TestHelper.h.

36 {
37 assert(_ptr < N);
38 _argv[_ptr] = new char[strlen(in) + 1];
39 strncpy(_argv[_ptr], in, strlen(in) + 1);
40 _ptr++;
41 }

◆ add() [2/2]

template<size_t N>
void Argv< N >::add ( const char *  in)
inline

Definition at line 38 of file TestHelper.h.

39 {
40 assert(_ptr < N);
41 _argv[_ptr] = new char[strlen(in) + 1];
42 strncpy(_argv[_ptr], in, strlen(in) + 1);
43 _ptr++;
44 }

◆ argv() [1/2]

template<size_t N>
pchar_t * Argv< N >::argv ( void  )
inline

Definition at line 43 of file TestHelper.h.

43{ return _argv; }

◆ argv() [2/2]

template<size_t N>
pchar_t * Argv< N >::argv ( void  )
inline

Definition at line 46 of file TestHelper.h.

46{ return _argv; }

The documentation for this class was generated from the following files: