ZE-Standard-Libraries/id/id.h

43 lines
908 B
C
Raw Normal View History

2018-07-25 14:10:09 +00:00
//
// id.h
// ZE-Standard-Libraries
//
// Created by 胡一兵 on 2018/7/25.
// Copyright © 2018年 ZE. All rights reserved.
//
#ifndef id_h
#define id_h
2018-07-30 09:45:33 +00:00
#include <stdio.h>
2018-07-25 14:10:09 +00:00
#include <stdlib.h>
2018-07-30 09:45:33 +00:00
#include <string.h>
2018-07-25 14:10:09 +00:00
#include <time.h>
2018-07-30 09:45:33 +00:00
#include "../type/type.h"
typedef struct s_id{
unsigned int type;
unsigned int (*value)[DEEPC_LEN];//4
unsigned int (*value_deeper)[DEEPB_LEN];//8
unsigned int (*value_deepest)[DEEPA_LEN];//32
unsigned int deep;
}SID;
2018-07-25 14:10:09 +00:00
/*有关id的函数*/
void init_rand(void);
unsigned long long getId(void);
/*有关s_id函数*/
2018-07-30 09:45:33 +00:00
SID *getS_id(unsigned int type ,unsigned int deep_level);
int fitS_id(const SID *fs_id, const SID *ss_id);
int simFitS_id(const SID *fs_id, const SID *ss_id);
char *s_idToASCIIString(const SID *s_id);
SID *asciiStringToS_id(const char *string);
SID *initS_id(unsigned int deep_level);
2018-07-30 10:07:24 +00:00
int freeS_id(SID *s_id);
2018-07-25 14:10:09 +00:00
#endif /* id_h */