Bcp 1.4.4
Loading...
Searching...
No Matches
BCP_indexed_pricing.hpp
Go to the documentation of this file.
1// Copyright (C) 2000, International Business Machines
2// Corporation and others. All Rights Reserved.
3#ifndef _BCP_INDEXED_PRICING_H
4#define _BCP_INDEXED_PRICING_H
5
6#if 0
7#include "BCP_enum.hpp"
8#include "BCP_vector.hpp"
9
10class BCP_buffer;
11
12class BCP_indexed_pricing_list {
13private:
14 inline void clean() { _del_pos.clear(); _indices.clear(); }
15private:
16 BCP_pricing_status _pr_status;
17 BCP_storage_t _storage;
18 BCP_vec<int> _del_pos;
19 BCP_vec<int> _indices;
20public:
21 BCP_indexed_pricing_list() :
22 _pr_status(BCP_PriceNothing), _storage(BCP_Storage_Explicit),
23 _del_pos(), _indices() {}
24 ~BCP_indexed_pricing_list() {}
25
26 // default assignment operator and copy constructors are fine
27
28 inline BCP_pricing_status get_status() const { return _pr_status; }
29 inline BCP_storage_t get_storage() const{ return _storage; }
30 inline const BCP_vec<int>& get_indices() const { return _indices; }
31
32 inline void empty(const BCP_storage_t storage) {
33 clean();
34 _storage = storage;
35 }
36
37 inline void set_status(BCP_pricing_status new_stat) {
38 _pr_status = new_stat; }
39 inline void set_indices(BCP_vec<int>& new_indices) {
40 _indices.swap(new_indices); }
41
42 void swap(BCP_indexed_pricing_list& x);
43 void update(const BCP_indexed_pricing_list& change);
44 BCP_indexed_pricing_list*
45 as_change(const BCP_indexed_pricing_list& old_list) const;
46
47 int pack_size() const; // *INLINE ?*
48 void pack(BCP_buffer& buf) const; // *INLINE ?*
49 void unpack(BCP_buffer& buf); // *INLINE ?*
50};
51#endif
52
53#endif
BCP_storage_t
This enumerative constant describes how to store certain data for a search tree node.
Definition BCP_enum.hpp:84
@ BCP_Storage_Explicit
The data stored is an explicit listing of values.
Definition BCP_enum.hpp:88
This class describes the message buffer used for all processes of BCP.
void clear()
Completely clear the buffer.
The class BCP_vec serves the same purpose as the vector class in the standard template library.
void swap(BCP_vec< T > &x)
Exchange the contents of the object with that of x.