Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
sortflts.h
Go to the documentation of this file.
1
/**********************************************************************
2
* File: sortflts.h (Formerly sfloats.h)
3
* Description: Code to maintain a sorted list of floats.
4
* Author: Ray Smith
5
* Created: Mon Oct 4 16:15:40 BST 1993
6
*
7
* (C) Copyright 1993, Hewlett-Packard Ltd.
8
** Licensed under the Apache License, Version 2.0 (the "License");
9
** you may not use this file except in compliance with the License.
10
** You may obtain a copy of the License at
11
** http://www.apache.org/licenses/LICENSE-2.0
12
** Unless required by applicable law or agreed to in writing, software
13
** distributed under the License is distributed on an "AS IS" BASIS,
14
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
** See the License for the specific language governing permissions and
16
** limitations under the License.
17
*
18
**********************************************************************/
19
20
#ifndef SORTFLTS_H
21
#define SORTFLTS_H
22
23
#include "
elst.h
"
24
25
class
SORTED_FLOAT
:
public
ELIST_LINK
26
{
27
friend
class
SORTED_FLOATS
;
28
29
public
:
30
SORTED_FLOAT
() {
31
}
//empty constructor
32
SORTED_FLOAT
(
//create one
33
float
value,
//value of entry
34
inT32
key) {
//reference
35
entry = value;
36
address = key;
37
}
38
private
:
39
float
entry;
//value of float
40
inT32
address;
//key
41
};
42
43
ELISTIZEH
(
SORTED_FLOAT
)
44
class
SORTED_FLOATS
45
{
46
public
:
48
SORTED_FLOATS
() {
49
it.set_to_list (&list);
50
}
56
void
add
(
float
value,
57
inT32
key);
62
void
remove
(
inT32
key);
67
float
operator[]
(
inT32
index);
68
69
private
:
70
SORTED_FLOAT_LIST list;
//list of floats
71
SORTED_FLOAT_IT it;
//iterator built-in
72
};
73
#endif
SORTED_FLOAT
Definition:
sortflts.h:25
SORTED_FLOATS::SORTED_FLOATS
SORTED_FLOATS()
Definition:
sortflts.h:48
SORTED_FLOATS::operator[]
float operator[](inT32 index)
Definition:
sortflts.cpp:73
ELIST_LINK
Definition:
elst.h:84
elst.h
ELISTIZEH
#define ELISTIZEH(CLASSNAME)
Definition:
elst.h:981
SORTED_FLOATS::add
void add(float value, inT32 key)
Definition:
sortflts.cpp:28
SORTED_FLOAT::SORTED_FLOAT
SORTED_FLOAT()
Definition:
sortflts.h:30
SORTED_FLOAT::SORTED_FLOAT
SORTED_FLOAT(float value, inT32 key)
Definition:
sortflts.h:32
SORTED_FLOATS
Definition:
sortflts.h:44
inT32
int inT32
Definition:
host.h:102
textord
sortflts.h
Generated on Mon Jul 20 2015 18:37:56 by
1.8.8