Initial import of the CDE 2.1.30 sources from the Open Group.
This commit is contained in:
123
cde/programs/dtinfo/DtMmdb/api/info_base.h
Normal file
123
cde/programs/dtinfo/DtMmdb/api/info_base.h
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
* $XConsortium: info_base.h /main/6 1996/09/04 01:37:17 cde-hal $
|
||||
*
|
||||
* Copyright (c) 1992 HAL Computer Systems International, Ltd.
|
||||
* All rights reserved. Unpublished -- rights reserved under
|
||||
* the Copyright Laws of the United States. USE OF A COPYRIGHT
|
||||
* NOTICE IS PRECAUTIONARY ONLY AND DOES NOT IMPLY PUBLICATION
|
||||
* OR DISCLOSURE.
|
||||
*
|
||||
* THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE
|
||||
* SECRETS OF HAL COMPUTER SYSTEMS INTERNATIONAL, LTD. USE,
|
||||
* DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT THE
|
||||
* PRIOR EXPRESS WRITTEN PERMISSION OF HAL COMPUTER SYSTEMS
|
||||
* INTERNATIONAL, LTD.
|
||||
*
|
||||
* RESTRICTED RIGHTS LEGEND
|
||||
* Use, duplication, or disclosure by the Government is subject
|
||||
* to the restrictions as set forth in subparagraph (c)(l)(ii)
|
||||
* of the Rights in Technical Data and Computer Software clause
|
||||
* at DFARS 252.227-7013.
|
||||
*
|
||||
* HAL COMPUTER SYSTEMS INTERNATIONAL, LTD.
|
||||
* 1315 Dell Avenue
|
||||
* Campbell, CA 95008
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _info_base_h
|
||||
#define _info_base_h 1
|
||||
|
||||
#include "utility/macro.h"
|
||||
#include "storage/version.h"
|
||||
#include "api/base.h"
|
||||
#include "mgrs/managers.h"
|
||||
#include "schema/object_dict.h"
|
||||
#include "object/cset.h"
|
||||
#include "object/dl_list.h"
|
||||
|
||||
class iterator
|
||||
{
|
||||
public:
|
||||
iterator( handler*, c_code_t );
|
||||
~iterator();
|
||||
|
||||
operator void*();
|
||||
|
||||
protected:
|
||||
handler* collection_hd;
|
||||
c_code_t instance_c_code;
|
||||
mmdb_pos_t ind;
|
||||
|
||||
friend class info_base;
|
||||
};
|
||||
|
||||
/*************************************/
|
||||
// The info_base class
|
||||
/*************************************/
|
||||
|
||||
class info_base : public base
|
||||
{
|
||||
|
||||
public:
|
||||
info_base( object_dict& dict,
|
||||
char** set_nms, char** list_nms,
|
||||
const char* base_dir, const char* base_name,
|
||||
const char* base_desc, const char* base_uid,
|
||||
const char* base_locale,
|
||||
const mm_version& v
|
||||
);
|
||||
virtual ~info_base();
|
||||
|
||||
// export funcs
|
||||
cset_handlerPtr get_set( const char* set_name );
|
||||
cset_handlerPtr get_set( int set_position );
|
||||
|
||||
dl_list_handlerPtr get_list( const char* list_name );
|
||||
dl_list_handlerPtr get_list( int list_position );
|
||||
|
||||
void add_composite(char* new_db_path, char* def_spec_path);
|
||||
|
||||
// query functions
|
||||
int num_of_docs();
|
||||
mm_version& data_version() { return f_v; };
|
||||
|
||||
// iterate over all instances with 'c_code' in a set or a list
|
||||
iterator* first(char* col_nm, c_code_t c_code);
|
||||
oid_t get_oid(const iterator& ind);
|
||||
void next(iterator&);
|
||||
|
||||
#ifdef C_API
|
||||
// an integer id within the infolib
|
||||
int index_id() { return f_index_id; };
|
||||
void set_index_id(int x) { f_index_id = x; };
|
||||
#endif
|
||||
|
||||
// build compression dicts. data is from stdin
|
||||
void build_dict(char* compress_agent_name);
|
||||
|
||||
const char* get_info_base_locale() const { return info_base_locale; }
|
||||
|
||||
protected:
|
||||
|
||||
cset_handlerPtr* info_base_set_ptrs;
|
||||
dl_list_handlerPtr* info_base_list_ptrs;
|
||||
|
||||
#ifdef C_API
|
||||
int f_index_id;
|
||||
#endif
|
||||
|
||||
mm_version f_v;
|
||||
|
||||
int get_set_pos( const char* set_name );
|
||||
int get_list_pos( const char* list_name );
|
||||
|
||||
friend class info_lib;
|
||||
|
||||
char info_base_locale[PATHSIZ];
|
||||
};
|
||||
|
||||
typedef info_base* info_basePtr;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user