public string OwnerName() { try { return(CppToCsharpAdapter.OwnerName(my_hash_file_pointer)); } catch (SEHException ex) { return(CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer)); } catch { throw; } }
public int OverflowAreaStart() { try { return(CppToCsharpAdapter.OverflowAreaStart(my_hash_file_pointer)); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public int NrOfRecsInFile() { try { return(CppToCsharpAdapter.NrOfRecsInFile(my_hash_file_pointer)); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public string GetBlockInfo(int blockNumber) { try { return(CppToCsharpAdapter.GetBlockInfo(my_hash_file_pointer, blockNumber)); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public int HashStringSimulation(string[] arr, int fileSize) { try { return(CppToCsharpAdapter.HashStringSimulation(my_hash_file_pointer, arr, arr.Length, fileSize)); } catch (SEHException) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public bool Check_If_Key_Is_In_This_Block(int hashnum, char[] Key) { try { return(CppToCsharpAdapter.Check_If_Key_Is_In_This_Block(my_hash_file_pointer, hashnum, Key)); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public void updateoff() { try { CppToCsharpAdapter.updateoff(my_hash_file_pointer); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public void Del_rec_Casing(string Key) { try { CppToCsharpAdapter.Del_rec_Casing(my_hash_file_pointer, Key); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public void hopen(string filename, string usernam, string path, string openmode) { try { CppToCsharpAdapter.hopen(my_hash_file_pointer, filename, usernam, path, openmode); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public string IntToString(int a) { try { return(CppToCsharpAdapter.int_to_string(my_hash_file_pointer, a)); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message + ex); } catch { throw; } }
public string filename() { try { string str = CppToCsharpAdapter.filename(my_hash_file_pointer); return(str); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public float load_factor() { try { float str = CppToCsharpAdapter.load_factor(my_hash_file_pointer); return(str); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public void hcreate(string filenam = "", string usernam = "", int longrecord = 0, string path = "", int sizefile = 0, int keyloc = 0, string type = "I", int keylong = 4, int hashfuncid = 1) { try { CppToCsharpAdapter.hcreate(my_hash_file_pointer, filenam, usernam, longrecord, path, sizefile, keyloc, type, keylong, hashfuncid); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public void Update(Object obj) { try { IntPtr buffer = Marshal.AllocHGlobal(Marshal.SizeOf(obj.GetType())); Marshal.StructureToPtr(obj, buffer, true); CppToCsharpAdapter.Update(my_hash_file_pointer, buffer); Marshal.FreeHGlobal(buffer); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public Object Read(int key, Object obj, int update = 0) { try { IntPtr buffer; buffer = Marshal.AllocHGlobal(Marshal.SizeOf(obj.GetType())); CppToCsharpAdapter.read(my_hash_file_pointer, key, buffer, update); Marshal.PtrToStructure(buffer, obj); //Marshal.FreeHGlobal(buffer); return(obj); } catch (SEHException ex) { string message = CppToCsharpAdapter.GetLastErrorMessage(this.my_hash_file_pointer); throw new Exception(message); } catch { throw; } }
public HashFile() { my_hash_file_pointer = CppToCsharpAdapter.MakeHashFileObject(); }