File: logical-inspectability.html

package info (click to toggle)
boost 1.27.0-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 19,908 kB
  • ctags: 26,546
  • sloc: cpp: 122,225; ansic: 10,956; python: 4,412; sh: 855; yacc: 803; makefile: 257; perl: 165; lex: 90; csh: 6
file content (75 lines) | stat: -rw-r--r-- 3,377 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<HTML><HEAD>
<!!---------------------------------------------------------------------->
<!! Copyright (C) 1999 Dietmar Kuehl, Claas Solutions GmbH >
<!!>
<!! Permission to use, copy, modify, distribute and sell this >
<!! software for any purpose is hereby granted without fee, provided >
<!! that the above copyright notice appears in all copies and that >
<!! both that copyright notice and this permission notice appear in >
<!! supporting documentation. Dietmar Kuehl and Claas Solutions make no >
<!! representations about the suitability of this software for any >
<!! purpose. It is provided "as is" without express or implied warranty. >
<!!---------------------------------------------------------------------->
<TITLE>logical-inspectability.3</TITLE>
</HEAD>
<BODY BGCOLOR=white LINK="0000FF" VLINK="800080">
<IMG SRC=../../c++boost.gif ALIGN=TOP WIDTH=277 HEIGHT=86><BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=2>
<TR><TD WIDTH=109 VALIGN=TOP><IMG SRC=sidebar.jpg WIDTH=109 HEIGHT=494>
</TD><TD>
<SPACER TYPE=VERTICAL SIZE=40>
<H1>Abstract View of Data Structures</H1>

  <A NAME="Description"><H1>Description</H1></A>

    For abstract data structures two things are important:
    <OL>
<LI>

        The operations working on the data structure.
      
<LI>

        The current state of the data structure.
    
</OL>


    It is quite common to provide a number of methods for data structures
    which perform the essential operations on these data structures. Also,
    some of the state, e.g. some sort of "size", is exposed to the user.
    However, often it is necessary to find out more about the current
    contents of the data structure. For example, the STL adaptor
    <nobr><tt>stack</tt></nobr> does not provide non-destructive access to the elements
    currently stored in the stack although this is clearly part of the
    logical concept "stack": It is only possible to get all elements by
    removing each of the elements in turn. However, in some applications
    (e.g. during searching a path in a graph) it is useful to get the
    contents of the stack.

    <P>


    The concept of <B>logical inspectability</B> refers to exposure of
    all state information of a data structure which is part of it's logic
    description. For example, the state of a stack is made up of all
    elements of the stack including their order and the current size of
    the stack. A stack has methods to push a new element on the stack,
    to access the current top element, to test whether there are elements
    stored in the stack and to remove the top element. To expose the
    whole state of the stack means, that there are also access methods to
    get all elements of the stack. However, it is not possible to change
    these elements or to add or remove elements at a different position than
    the stack's top. Correspondingly, the stack is not required to
    expose any information about the underlying container used to implement
    the stack: This can e.g. be a list or a vector but this does not matter
    for the stack's state.
    
  
<HR>

Copyright &copy 1999 <A HREF=http://www.claas-solutions.de/kuehl>Dietmar K&uuml;hl</A> (<A HREF="mailto:dietmar.kuehl@claas-solutions.de">dietmar.kuehl@claas-solutions.de</A>)<BR>
<a href="http://www.claas-solutions.de/">Claas Solutions GmbH</a>
</TD></TR></TABLE>
</BODY></HTML>