亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? class.h

?? FastDb是高效的內存數據庫系統
?? H
?? 第 1 頁 / 共 3 頁
字號:
//-< CLASS.H >-------------------------------------------------------*--------*
// FastDB                    Version 1.0         (c) 1999  GARRET    *     ?  *
// (Main Memory Database Management System)                          *   /\|  *
//                                                                   *  /  \  *
//                          Created:     20-Nov-98    K.A. Knizhnik  * / [] \ *
//                          Last update: 10-Dec-98    K.A. Knizhnik  * GARRET *
//-------------------------------------------------------------------*--------*
// Metaclass information
//-------------------------------------------------------------------*--------*

#ifndef __CLASS_H__
#define __CLASS_H__

#include "stdtp.h"
#include "sync.h"

#ifdef USE_STD_STRING
#include <string>
#endif

#ifndef dbDatabaseOffsetBits
#define dbDatabaseOffsetBits 32
#endif

#ifndef dbDatabaseOidBits
#define dbDatabaseOidBits 32
#endif

/**
 * Object indentifier type
 */
#if dbDatabaseOidBits > 32
typedef nat8 oid_t;  // It will work only for 64-bit OS
#else
typedef nat4 oid_t;
#endif

/**
 * Object offset in the file type
 */
#if dbDatabaseOffsetBits > 32
typedef nat8 offs_t; // It will work only for 64-bit OS
#else
typedef nat4 offs_t;
#endif

/**
 * Types of field index
 */
enum dbIndexType {
  HASHED  = 1, // hash table
  INDEXED = 2, // T-tree

  DB_FIELD_CASCADE_DELETE = 8,   // Used by OWNER macro, do not set it explicitly

  AUTOINCREMENT = 16, // field is assigned automaticall incremented value

  DB_FIELD_INHERITED_MASK = ~(HASHED|INDEXED)
};


/**
 * Macro for describing indexed fields
 */
#define KEY(x, index) \
    *dbDescribeField(new dbFieldDescriptor(#x, (char*)&x-(char*)this, \
                                           sizeof(x), index), x)

/**
 * Macro for describing non-indexed fields
 */
#define FIELD(x) KEY(x, 0)

/**
 * Comparator for user defined raw binary fields
 */
typedef int (*dbUDTComparator)(void*, void*, size_t);

/**
 * Macro used to describe indexed raw binary fields with user-defined comparator
 */
#define UDT(x, index, comparator) \
    *dbDescribeRawField(new dbFieldDescriptor(#x, (char*)&x-(char*)this, \
                                              sizeof(x), index), (dbUDTComparator)comparator)

/**
 * Macro used to describe raw binary field
 */
#define RAWFIELD(x) UDT(x, 0, &memcmp)

/**
 * Macro used to describe indexed raw binary field
 */
#define RAWKEY(x, index) UDT(x, index, &memcmp)

/**
 * Macro for describing relations between two tables. 
 * <code>x</code> should specify name of reference or array of reference field in this table, 
 * and <code>inverse</code> - field in the referenced table contining inverse reference.
 */
#define RELATION(x,inverse) \
    *dbDescribeField(new dbFieldDescriptor(#x, (char*)&x-(char*)this, \
                                           sizeof(x), 0, #inverse), x)

/**
 * Macro used to define relation owner (when owner is deleted, all referenced
 * members are also deleted). Members of of this relation should use 
 * <code>RELATION</code> macro to describe relation with owner.  
 */
#define OWNER(x,member) \
    *dbDescribeField(new dbFieldDescriptor(#x, (char*)&x-(char*)this, \
                                           sizeof(x), DB_FIELD_CASCADE_DELETE, \
                                           #member), x)
/**
 * Macro used to describe method of the class which can be invoked from SubSQL
 */
#define METHOD(x) \
    *dbDescribeMethod(new dbFieldDescriptor(#x), &self::x)

/**
 * Macro used to describe superclass for this class
 */
#define SUPERCLASS(x) \
    x::dbDescribeComponents(NULL)->adjustOffsets((char*)((x*)this)-(char*)this)

/**
 * Macro used to describe fields of the record. Use <code>FIELD, KEY</code>...
 * macros separated by comma inside this macro to describe all fields of the record
 */
#define TYPE_DESCRIPTOR(fields) \
    dbFieldDescriptor* dbDescribeComponents(dbFieldDescriptor*) { \
 return &fields; \
    } \
    static dbTableDescriptor dbDescriptor


/**
 * Macro used to describe class, the only difference from <code>TYPE_DESCRIPTOR</code>
 * is that name of the class should be specified. This name is needed if you want
 * to describe methods.
 */
#define CLASS_DESCRIPTOR(name, fields) \
    typedef name self; \
    dbFieldDescriptor* dbDescribeComponents(dbFieldDescriptor*) { \
 return &fields; \
    } \
    static dbTableDescriptor dbDescriptor

/**
 * Register table descriptor and assign it to specified database
 */
#define REGISTER_IN(table, database) \
    dbTableDescriptor* dbGetTableDescriptor(table*) \
      { return &table::dbDescriptor; }            \
    static dbFieldDescriptor* dbDescribeComponentsOf##table() \
      { return ((table*)0)->dbDescribeComponents(NULL); }     \
    dbTableDescriptor table::dbDescriptor(#table, database, sizeof(table), \
                                          &dbDescribeComponentsOf##table)

/**
 * Register table descripttor. It will be assigned to the database when database will be 
 * opened
 */
#define REGISTER(table) REGISTER_IN(table, NULL)

/**
 * Register database and mark it as unsigned. Programmer should explicitly
 * specify database in all operations.
 */
#define DETACHED_TABLE ((dbDatabase*)-1)
#define REGISTER_UNASSIGNED(table) REGISTER_IN(table, DETACHED_TABLE)


class dbDatabase;

class dbAnyArray;

class dbTableDescriptor;

class dbAnyMethodTrampoline;

/**
 * Descriptor of table field
 */

class FASTDB_DLL_ENTRY dbFieldDescriptor
{

public:
  /**
   * Next file within scope
   */
  dbFieldDescriptor* next;
  /**
   * Previous field within scope
   */
  dbFieldDescriptor* prev;

  /**
   * Next field in the list of all fields in the table
   */
  dbFieldDescriptor* nextField;

  /**
   * Next field in the list of all hashed fields in the table
   */
  dbFieldDescriptor* nextHashedField;

  /**
   * Next field in the list of all indexed fields in the table
   */
  dbFieldDescriptor* nextIndexedField;

  /**
   * Next field in the list of all relation fields in the table
   */
  dbFieldDescriptor* nextInverseField;

  /**
   * Column number
   */
  int                fieldNo;

  /**
   * Name of the field
   */
  char*              name;

  /**
   * Compound name of field, for example "coord.x"
   */
  char*              longName;

  /**
   * Name of referenced table (for reference fields only)
   */
  char*              refTableName;

  /**
   * Referenced table (for reference fields only)
   */
  dbTableDescriptor* refTable;

  /**
   * Definition of the table to which this field belongs
   */
  dbTableDescriptor* defTable;

  /**
   * Inverse reference (for reference fields only)
   */
  dbFieldDescriptor* inverseRef;

  /**
   * Inverse reference name (for reference fields only)
   */
  char*              inverseRefName;

  /**
   * Type of the field in the database (dbField::FieldTypes)
   */
  int                type;

  /**
   * Type of the field in application
   */
  int                appType;

  /**
   * Type of field index (bit combination of constants defined in dbIndexType)
   */
  int                indexType;

  /**
   * Offset to the field in database
   */
  int                dbsOffs;

  /**
   * Offset to the field in application
   */
  int                appOffs;

  /**
   * Subcomponents of the field (for structures and arrays)
   */
  dbFieldDescriptor* components;

  /**
   * Hash table (for fields which are indexed by means of hash table)
   */
  oid_t              hashTable;

  /**
   * T-Tree (for fields which are indexed by means of T-Ttree)
   */
  oid_t              tTree;

  /**
   * Size of the record in database
   */
  size_t             dbsSize;

  /**
   * Size of the object in application
   */
  size_t             appSize;

  /**
   * Alignment of the field (for structures it is equal to the maximum required alignment 
   * of it's components
   */
  size_t             alignment;

  /**
   * Comparator for user defined types
   */
  dbUDTComparator    comparator;

  /**
   * Attributes of the field
   */
  enum FieldAttributes {
    ComponentOfArray   = 0x01,
    HasArrayComponents = 0x02,
    OneToOneMapping    = 0x04,
    Updated            = 0x08
  };
  int                attr;

  /**
   * Old type of the field in database (before schema evaluation)
   */
  int                oldDbsType;
  /**
   * Old offset of the field in database (before schema evaluation)
   */
  int                oldDbsOffs;
  /**
   * Old size of the field in database (before schema evaluation)
   */
  int                oldDbsSize;

  /**
   * Trampoline used to invoke class method from SubSQL (for method components only)
   */
  dbAnyMethodTrampoline* method;

  /**
   * Allocator of array components
   */
  void (*arrayAllocator)(dbAnyArray* array, void* data, size_t length);


  /**
   * Calculate record size in the database.
   * This method performs interation through all components in one scope
   * and recursively invokes itself for structure and array components. 
   * First time this method is invoked by table descriptor with <code>offs</code>
   * equal to size of fixed part of the record.
   * @param base address of the application object 
   * @param offs offset of the end of varying part of the record
   * @return size of the record
   */
  size_t calculateRecordSize(byte* base, size_t offs);

  /**
   * Calculate record size after reformatting record according
   * to the new definition of the application class.
   * This method performs interation thtough all components in one scope
   * and recursively invoke itself for structure and array components. 
   * @param base address of the application object 
   * @param offs offset of the end of varying part of the record
   * @return size of the record
   */
  size_t calculateNewRecordSize(byte* base, size_t offs);

  /**
   * Convert of the feild to new format.
   * This method is recursively invoked for array and structure components.     
   * @param dst destination for converted field
   * @param src original field
   * @param offs offset of varying part
   * @param offs offset of the end of varying part of the record
   * @return size of the record
   */
  size_t convertRecord(byte* dst, byte* src, size_t offs);

  /**
   * Size of the record without one field. This method is used to implement 
   * automatically updated inverse references.
   * This method performs interation thtough all components in one scope
   * and recursively invoke itself for structure and array components.      
   * @param field list of the fields in one scope
   * @param base pointer inside database
   * @param size [in/out] size of the record
   * @return offset of last field
   */
  int    sizeWithoutOneField(dbFieldDescriptor* field,
                             byte* base, size_t& size);

  /**
   * Recursively copy record to new location except one field. This method
   * is used for updating inverse references.
   * @param field list of the fields in one scope
   * @param dst destination where record should be copied
   * @param src source of the copy
   * @param offs offset to the end of varying part
   * @return size of the record
   */
  size_t copyRecordExceptOneField(dbFieldDescriptor* field,
                                  byte* dst, byte* src, size_t offs);

  /**
   * Store record fields in the databases
   * This method performs interation thtough all components in one scope
   * and recursively invoke itself for structure and array components.      
   * @param dst place in the database where record should be stored
   * @param src pointer to the application object
   * @param offset to the end of varying part
   * @param insert flag used to distringuish update fro insert (needed for autoincremented fields)
   * @return size of the record
   */
  size_t storeRecordFields(byte* dst, byte* src, size_t offs, bool insert);

  /**
   * Mask updated fields.
   * This method performs interation thtough all components in one scope
   * and recursively invoke itself for structure and array components.      
   * @param dst old image of the record in the database
   * @param src updated application object
   */
  void markUpdatedFields(byte* dst, byte* src);

  /**

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品在欧美一区二区少妇| 国产精品久久福利| 国产精品视频yy9299一区| 亚洲电影在线播放| 国产乱妇无码大片在线观看| 91国模大尺度私拍在线视频| 国产欧美日韩中文久久| 日韩福利电影在线| 欧美性受xxxx黑人xyx性爽| 欧美国产综合一区二区| 免费在线观看一区| 欧美伊人久久大香线蕉综合69| 中文字幕精品在线不卡| 激情文学综合网| 欧美成人一区二区三区| 美洲天堂一区二卡三卡四卡视频| 欧美亚洲一区二区在线观看| 最新欧美精品一区二区三区| 国产精品1024| 久久精品视频网| 久久99久久久欧美国产| 日韩一级黄色片| 日产国产欧美视频一区精品| 欧美性一级生活| 亚洲精品v日韩精品| 97精品国产97久久久久久久久久久久| 国产午夜精品久久| 成人自拍视频在线| 亚洲国产电影在线观看| 丁香另类激情小说| 国产精品区一区二区三| 99热在这里有精品免费| 中文字幕一区二区三区乱码在线| av亚洲产国偷v产偷v自拍| 国产精品欧美经典| 91视频国产观看| 亚洲国产日韩一区二区| 4438x亚洲最大成人网| 丝袜国产日韩另类美女| 欧美一区二区成人| 国内外成人在线| 中文字幕av一区 二区| fc2成人免费人成在线观看播放| 国产精品第一页第二页第三页| 99久久精品国产麻豆演员表| 一区二区三区产品免费精品久久75| 91福利视频久久久久| 午夜精品久久久久影视| 日韩一区二区三区视频在线| 精品亚洲porn| 中文字幕av资源一区| 欧洲精品在线观看| 麻豆精品在线看| 亚洲欧洲精品一区二区三区不卡| 色婷婷综合久久久| 蜜臀91精品一区二区三区| 久久久亚洲精品一区二区三区| 成人伦理片在线| 午夜私人影院久久久久| 中文字幕免费观看一区| 99精品视频在线免费观看| 午夜av电影一区| 国产欧美精品在线观看| 欧美无人高清视频在线观看| 日本不卡的三区四区五区| 国产亚洲一区二区在线观看| 欧美色网一区二区| 国产精品99久久久久久有的能看| 亚洲精品国产精品乱码不99| 日韩精品一区二区三区中文不卡| 高清国产一区二区三区| 日韩精品一区第一页| 国产亚洲短视频| 欧美精品xxxxbbbb| av资源网一区| 麻豆91小视频| 亚洲最大的成人av| 国产精品国产三级国产有无不卡| 91精品国产综合久久久久久漫画| 国产一区91精品张津瑜| 天天做天天摸天天爽国产一区| 久久精品一二三| 欧美精品视频www在线观看| www.亚洲精品| 国产一区二区三区在线观看免费| 婷婷久久综合九色国产成人 | 亚洲成av人片一区二区梦乃| 国产丝袜美腿一区二区三区| 在线播放91灌醉迷j高跟美女| 成人少妇影院yyyy| 国内精品久久久久影院一蜜桃| 亚洲成人激情av| 亚洲欧美国产毛片在线| 久久精品视频免费| 精品1区2区在线观看| 欧美狂野另类xxxxoooo| 91蜜桃免费观看视频| 丰满亚洲少妇av| 国产精品一区二区久久不卡| 日韩电影在线免费| 午夜欧美一区二区三区在线播放| 成人免费在线播放视频| 欧美国产视频在线| 日本一区二区视频在线| 久久理论电影网| 久久久午夜精品理论片中文字幕| 日韩久久久精品| 欧美一区二区在线视频| 91精品国产麻豆| 制服视频三区第一页精品| 欧美日韩精品一区二区天天拍小说 | 91免费国产在线观看| 大胆欧美人体老妇| 成人精品免费看| 99久久精品免费观看| 不卡影院免费观看| 99麻豆久久久国产精品免费| 成人视屏免费看| 91网址在线看| 欧美亚洲愉拍一区二区| 欧美日韩成人在线| 欧美一级欧美一级在线播放| 日韩欧美成人午夜| 精品国产乱码久久久久久久久| 日韩免费高清av| 久久久九九九九| 亚洲图片欧美激情| 亚洲午夜激情av| 美女视频免费一区| 国产盗摄女厕一区二区三区| 成人夜色视频网站在线观看| 91社区在线播放| 在线播放中文字幕一区| 26uuu另类欧美亚洲曰本| 国产精品天干天干在观线| 亚洲色大成网站www久久九九| ...xxx性欧美| 丝袜美腿亚洲综合| 国产精品1024| 欧美三级在线看| 亚洲精品一区二区三区影院 | 国产不卡高清在线观看视频| 99久久国产综合色|国产精品| 色婷婷精品久久二区二区蜜臂av | 成人高清在线视频| 欧美日韩国产综合久久| 精品久久久久一区二区国产| 国产精品麻豆欧美日韩ww| 亚洲国产日韩a在线播放| 精品一区二区久久| 91麻豆国产在线观看| 日韩视频在线你懂得| 国产精品―色哟哟| 日本伊人午夜精品| 成人av在线影院| 日韩免费性生活视频播放| 最好看的中文字幕久久| 秋霞午夜av一区二区三区| 成人黄色在线视频| 欧美一级在线免费| 亚洲六月丁香色婷婷综合久久| 免费成人在线影院| 欧美mv日韩mv| 亚洲乱码国产乱码精品精小说 | 91激情在线视频| 久久精子c满五个校花| 亚洲综合自拍偷拍| 国产69精品久久99不卡| 日韩一区二区三区四区| 亚洲午夜日本在线观看| 成人av电影观看| 久久久久亚洲蜜桃| 日本aⅴ亚洲精品中文乱码| 色综合久久久网| 国产视频一区二区三区在线观看 | 亚洲一区二区三区爽爽爽爽爽| 丰满放荡岳乱妇91ww| 欧美不卡一二三| 亚洲午夜在线观看视频在线| 91在线视频免费91| 欧美经典一区二区三区| 久久超碰97中文字幕| 欧美日韩精品一区二区| 亚洲视频每日更新| 国产白丝精品91爽爽久久| 久久众筹精品私拍模特| 精品一区二区三区在线视频| 欧美精品色综合| 肉色丝袜一区二区| 欧美中文字幕一二三区视频| 国产精品久久影院| 白白色 亚洲乱淫| 国产精品久久一级| 成人91在线观看| 国产精品高潮呻吟| av毛片久久久久**hd| 中文字幕中文在线不卡住| 成人黄色小视频| 亚洲图片激情小说| 在线视频综合导航|