Annotation of parser3/src/types/pa_vmemcached.h, revision 1.1
1.1 ! moko 1: /** @file
! 2: Parser: memcached class decls.
! 3:
! 4: Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)
! 5: Authors:
! 6: Ivan Poluyanov <ivan-poluyanov@yandex.ru>
! 7: Artem Stepanov <timofei1394@thesecure.in>
! 8: */
! 9:
! 10: #ifndef PA_VMEMCACHED_H
! 11: #define PA_VMEMCACHED_H
! 12:
! 13: #define IDENT_PA_VMEMCACHED_H "$Id: 15:34 13.07.2009 $"
! 14:
! 15: #include "classes.h"
! 16: #include "pa_vstateless_object.h"
! 17:
! 18: #include "pa_memcached.h"
! 19:
! 20: // defines
! 21: #define VMEMCACHED_TYPE "memcached"
! 22:
! 23: // externs
! 24: extern Methoded *memcached_class;
! 25:
! 26: class VMemcached: public VStateless_object {
! 27: public:
! 28: override const char* type() const { return VMEMCACHED_TYPE; }
! 29: override VStateless_class *get_class() { return memcached_class; }
! 30: override bool as_bool() const { return true; }
! 31:
! 32: override Value* get_element(const String& aname);
! 33: override const VJunction* put_element(const String& aname, Value* avalue, bool /*replace*/);
! 34:
! 35: public: // usage
! 36: VMemcached(): fm(0), fflags(0) {}
! 37:
! 38: ~VMemcached(){
! 39: if(fm)
! 40: f_memcached_free(fm);
! 41: }
! 42:
! 43: void open(const String& connect_string, size_t aflags=0);
! 44: void remove(const String& aname);
! 45:
! 46: private:
! 47: memcached_st* fm;
! 48: uint32_t fflags;
! 49:
! 50: };
! 51:
! 52: #endif
! 53:
E-mail: