new structure

This commit is contained in:
Valk Richard Li
2019-08-08 02:25:48 +08:00
committed by GitHub
parent 6ede22aa77
commit b23d6cd5d6
14 changed files with 1257 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#ifndef __NASAL_HASH_H__
#define __NASAL_HASH_H__
struct nasal_hash_unit
{
std::string name;
std::string type;
void *data;
nasal_hash_unit *next;
};
class nasal_hash
{
private:
nasal_hash_unit *head;
public:
nasal_hash();
~nasal_hash();
nasal_hash& operator=(const nasal_hash&);
void append_var(var&);
void append_list(nasal_list&);
void append_hash(nasal_hash&);
int contains(std::string&);
int delete_element(std::string&);
nasal_list keys();
};
#endif