Annotation of parser3/src/types/pa_vhashfile.C, revision 1.3
1.1 parser 1: /** @file
2: Parser: @b table class.
3:
4: Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com)
5: Author: Alexander Petrosyan <paf@design.ru>(http://design.ru/paf)
6:
1.3 ! parser 7: $Id: pa_vhashfile.C,v 1.2 2001/10/22 13:52:20 parser Exp $
1.1 parser 8: */
9:
10: #include "pa_config_includes.h"
11: #ifdef HAVE_LIBDB
12:
13: #include "pa_vtable.h"
14: #include "pa_vstring.h"
15: #include "pa_vhashfile.h"
16: #include "pa_threads.h"
17:
18:
19: // methods
20:
1.3 ! parser 21: void VHashfile_cleanup(void *vhashfile) {
! 22: //_asm int 3;
! 23: static_cast<VHashfile *>(vhashfile)->cleanup();
1.1 parser 24: }
25:
26: void VHashfile::put_field(const String& name, Value *value) {
1.3 ! parser 27: DB_Connection& connection=get_connection(&name);
! 28: connection.put(name, value->as_string());
1.1 parser 29: }
30:
31: Value *VHashfile::get_field(const String& name) {
1.3 ! parser 32: DB_Connection& connection=get_connection(&name);
! 33: if(String *string=connection.get(name))
! 34: return NEW VString(*string);
! 35: else
! 36: return 0;
1.1 parser 37: }
38:
39: Hash *VHashfile::get_hash() {
40: return 0;
41: }
42:
43: #endif
E-mail: