summaryrefslogtreecommitdiff
path: root/base.h
blob: d1c37bab317efcca6d758f269072ec1be73f9ab7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// template class data declaration;

#ifndef BASE_H
#define BASE_H

#include <vector> 
#include "incl.h"
#include "name.h"

class base
{
private:
 vector<name*>   vec_elem    ;
 pthread_mutex_t mut_vec_elem; 

public:
  base();
 ~base();

 virtual void  add_elem( name*   p_name );                // add a element.
 virtual bool  del_elem( string &s_name );                // delete a alement.
 virtual name* get_elem( string &s_name, bool &b_found ); // get a element.

 // execute func on all elements of vec_elem. v_pointer is the argument.
 virtual void  run_func( void (*func)(name*, void*), void* v_arg );
};

#endif