U E D R , A S I H C RSS

Project Gaia/Temp

API 설계

  • pseudo code 작성
    ~cpp 
    
    typedef struct {
    	int preBits = 3 // header;
    	unsigned int leafs[8]	// pointer;
    }DIRECTORY;
    
    
    typedef struct{
    	unsigned int pseudokey // header;
    	unsigned int numOfBucket;
    	unsigned int bucket[];
    }LEAF;
    
    
    FILE create_h(char* fileName);	// 새로운 해쉬 구조 생성
    void open_h(FILE fileHandle, unsigned int psedoKey);		// 기존 해쉬 구조 열기
    void close_h(FILE f);		// 해쉬 구조 닫기
    void insert_h();	// 해쉬 값 넣기
    void retrieve_h(FILE f, unsigned int pseudoKey);	// 검색하기
    void delete_h();	// 해쉬지우기
    
    /* pseudo code */
    
    File f = create_h("Test");
    
    FILE f = open_h("fileName.dot", pseudoKey );
    
    unsigned realKey = 10;
    char* data = "ThisIsATest";
    
    unsigned int pseudoKey = hash_func_h(realKey);
    
    insert( f, pseudoKey, data );
    
    char* pRetrieved_data = retrieve_h(f, pseudoKey );
    
    prinf("%s", pRetrieved_data );
    
    free(data);
    
    close_h(f);
    


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:24:04
Processing time 0.0190 sec