From 5df94cd0e2e2433ed06dc4e330c788fb5f144678 Mon Sep 17 00:00:00 2001 From: nobody Date: Fri, 10 May 2002 04:34:27 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'RC_1_28_0'. [SVN r13795] --- LvaluePropertyAccessor.html | 106 --------- ReadWritePropertyAccessor.html | 79 ------- ReadablePropertyAccessor.html | 114 ---------- WritablePropertyAccessor.html | 140 ------------ identity_property_accessor.html | 125 ---------- property_accessor.html | 210 ----------------- random_access_iterator_property_accessor.html | 213 ------------------ 7 files changed, 987 deletions(-) delete mode 100644 LvaluePropertyAccessor.html delete mode 100644 ReadWritePropertyAccessor.html delete mode 100644 ReadablePropertyAccessor.html delete mode 100644 WritablePropertyAccessor.html delete mode 100644 identity_property_accessor.html delete mode 100644 property_accessor.html delete mode 100644 random_access_iterator_property_accessor.html diff --git a/LvaluePropertyAccessor.html b/LvaluePropertyAccessor.html deleted file mode 100644 index 06ba40e..0000000 --- a/LvaluePropertyAccessor.html +++ /dev/null @@ -1,106 +0,0 @@ - - - -LvaluePropertyAccessor - -C++ Boost - -
- -

-LvaluePropertyAccessor -

- -The LvaluePropertyAccessor provides an interface for accessing a -reference to a property object (instead of a copy of the object as in -the get() function required by ReadablePropertyAccessor). An -LvaluePropertyAccessor can be mutable or -non-mutable. The mutable LvaluePropertyAccessor returns a -reference whereas the non-mutable returns a const reference. - -

Refinement of

- -ReadablePropertyAccessor -for non-mutable or ReadWritePropertyAccessor for mutable property accessor. - -

Notation

- - - - - - - - - - - - - - - -
PAA type that is a model of LvaluePropertyAccessor.
paAn object of type PA.
keyAn object of type boost::property_traits<PA>::key_type.
- - -

Associated Types

- - - - - - - - -
Property Accessor Category -boost::property_traits<PA>::category -The category of the property: a type convertible to -boost::lvalue_property_accessor_tag. -
- -

Valid Expressions

- - - - - - - - - - - - - -
NameExpressionReturn TypeDescription
Access Property Value pa[key] -value_type& for mutable, const value_type& -otherwise. -Obtain a reference to the property identified by key.
- -

See Also

- -Property accessor concepts - - -
-
- - -
Copyright © 2000 -Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) -
- - - diff --git a/ReadWritePropertyAccessor.html b/ReadWritePropertyAccessor.html deleted file mode 100644 index a637199..0000000 --- a/ReadWritePropertyAccessor.html +++ /dev/null @@ -1,79 +0,0 @@ - - - -ReadWritePropertyAccessor - -C++ Boost - -
- -

- -
-ReadWritePropertyAccessor -

- -A ReadWritePropertyAccessor can be used to read property values via -the get() function and can be used to write property values -via the put() function. - -

Refinement of

- -ReadablePropertyAccessor -and -WritablePropertyAccessor - - - -

Notation

- - - - - - - -
PAA type that is a model of LvaluePropertyAccessor.
- -

Associated Types

- - - - - - - - -
Property Accessor Category -boost::property_traits<PA>::category -The category of the property accessor must be a type convertible to -read_write_property_accessor_tag. -
- -

See Also

- -Property accessor concepts - - -
-
- - -
Copyright © 2000 -Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) -
- - - diff --git a/ReadablePropertyAccessor.html b/ReadablePropertyAccessor.html deleted file mode 100644 index 4f01cae..0000000 --- a/ReadablePropertyAccessor.html +++ /dev/null @@ -1,114 +0,0 @@ - - - -ReadablePropertyAccessor - -C++ Boost - -
- - -

-ReadablePropertyAccessor -

- -A ReadablePropertyAccessor provides read-access to the value object -associted with a given key via a call to the get() function. -The get() function returns a copy of the value object. - -

Refinement of

- -CopyConstructible - -

Notation

- - - - - - - - - - - - - - - -
PAA type that is a model of LvaluePropertyAccessor.
paAn object of type PA.
keyAn object of type boost::property_traits<PA>::key_type.
- -

Associated Types

- - - - - - - - - - - - - - - - - - - - - -
Value Type boost::property_traits<PA>::value_typeThe type of the property.
Key Typeboost::property_traits<PA>::key_type -The type of the key object used to look up the property. The property -accessor may be templated on the key type, in which case this -typedef can be void. -
Property Accessor Categoryboost::property_traits<PA>::category -The category of the property: a type convertible to -readable_property_accessor_tag. -
- -

Valid Expressions

- - - - - - - - - - - - - -
NameExpressionReturn TypeDescription
Get Property Value get(pa, key)value_typeLookup the property of the object identified by key.
- -

See Also

- -Property accessor concepts - - -
-
- - -
Copyright © 2000 -Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) -
- - - diff --git a/WritablePropertyAccessor.html b/WritablePropertyAccessor.html deleted file mode 100644 index 896d10c..0000000 --- a/WritablePropertyAccessor.html +++ /dev/null @@ -1,140 +0,0 @@ - - - -WritablePropertyAccessor - -C++ Boost - -
- - -

-WritablePropertyAccessor -

- -A WritablePropertyAccessor has the capability of setting the value -object associated with the given key object via the put() -function. - -

Refinement of

- -CopyConstructible - - -

Notation

- - - - - - - - - - - - - - - - - - -
PAA type that is a model of LvaluePropertyAccessor.
paAn object of type PA.
keyAn object of type boost::property_traits<PA>::key_type.
valAn object of type boost::property_traits<PA>::value_type.
- -

Associated Types

- - - - - - - - - - - - - - - - - - - - - -
Value Typeboost::property_traits<PA>::value_type -The type of the property. -
Key Typeboost::property_traits<PA>::key_type -The type of the key object used to look up the property. The property -accessor may be templated on the key type, in which case this typedef -can be void. -
Property Accessor Category boost::property_traits<PA>::category -The category of the property: a type convertible to -writable_property_accessor_tag. -
- - -

Valid Expressions

- - - - - - - - - - - - - -
NameExpressionReturn TypeDescription
Put Property Value[1]put(pa, key, val)void -Assign val to the property associated with k. -
- - -

Notes

- -[1] The function put() was originally named -set(), but was changed to avoid name conflicts with the -std::set class when using a compiler (Microsoft Visual C++) -with non-standard name lookup rules. The following example demonstrates -the problem. -
-#include <set>
-using namespace std;
-namespace boost {
-  void set() { }
-}
-
- - -

See Also

- -Property accessor concepts - - -
-
- - -
Copyright © 2000 -Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) -
- - - diff --git a/identity_property_accessor.html b/identity_property_accessor.html deleted file mode 100644 index 34c928f..0000000 --- a/identity_property_accessor.html +++ /dev/null @@ -1,125 +0,0 @@ - - - -Identity Property Accessor - -C++ Boost - -
- -

-
-identity_property_accessor
-
-

- -This property accessor applies the identity function, that is, it just -returns a copy of the key object that was input. - -

Model of

- -ReadablePropertyAccessor - -

Associated Types

- - - - - - - - - - - - - - - - - - - - - -
TypeDescription
-boost::property_traits<identity_property_accessor>::value_type - -This type is void; the accessor functions are templated. -
-boost::property_traits<identity_property_accessor>::key_type - -This type is void; the accessor functions are templated. -
-boost::property_traits<identity_property_accessor>::category - -This type is boost::readable_op_bracket_tag. -
- -

Member Functions

- - - - - - - - - - - -
MemberDescription
-template <class T>
-T operator[](T x) const -
-Returns a copy of object x. -
- -

Non-Member Functions

- - - - - - - - - - - -
MemberDescription
-template <class T>
-T get(const identity_property_accessor& pa, T x) -
-Returns a copy of object x. -
- - -
-
- - -
Copyright © 2000 -Jeremy Siek, -Univ.of Notre Dame (jsiek@lsc.nd.edu)
-Lie-Quan Lee, Univ.of Notre Dame (llee1@lsc.nd.edu)
-Andrew Lumsdaine, -Univ.of Notre Dame (lums@lsc.nd.edu) -
- - - diff --git a/property_accessor.html b/property_accessor.html deleted file mode 100644 index 497ccf3..0000000 --- a/property_accessor.html +++ /dev/null @@ -1,210 +0,0 @@ - - - -Property Accessor Concepts - -C++ Boost - -
- - -

-Property Accessor Concepts -

- -The property accessor interface consists of a set of concept that -define a general purpose mechanism for mapping key objects to -corresponding value objects, thereby hiding the details of how the -mapping is implemented from algorithms that use property accessors. -The property accessor requirements are purposefully vague on the type -of the key and value objects to allow for the utmost flexibility. -Since the property accessor operations are global functions, it is -possible to overload the accessor functions such that nearly arbitrary -property accessor types and key types can be used. The interface for -property accessors consists of three functions: get(), -put(), and at(). The following concrete example -shows how the three functions could be used to access the addresses -associated with various people. - -
-template <class AddressAccessor>
-void foo(AddressAccessor address)
-{
-  typedef typename boost::property_traits<AddressAccessor>::value_type value_type;
-  typedef typename boost::property_traits<AddressAccessor>::key_type key_type;
-
-  value_type old_address, new_address;
-  key_type fred = "Fred";
-  old_address = get(address, fred);
-  new_address = "384 Fitzpatrick Street"
-  put(address, fred, new_address);
-
-  key_type joe = "Joe";
-  value_type& joes_address = at(address, joe);
-  joes_address = "325 Cushing Avenue";
-}
-
- -

-For each property accessor object there is a set of valid keys -for which the mapping to value objects is defined. Invoking a -property accessor function on an invalid key results in -undefined behaviour. The property accessor concepts do not specify how -this set of valid keys is created or modified. A function that uses a -property accessor must specify the expected set of valid keys in its -preconditions. - -

-The need for property accessors came out of the design of the Boost -Graph Library, whose algorithms needed an interface for accessing -properties attached to vertices and edges in a graph. In this context -the vertex and edge descriptors are the key type of the property -accessors. - - - -

-Several categories of property accessors provide -different access capabilities: -

-
readable
-
The associated property data can only be read. - The data is returned by-value. Many property accessors defining the - problem input (such as edge weight) can be defined as readable - property accessors. - -

-

-
writeable
-
The associated property can only be written to. - The parent array used to record the paths in a bread-first search tree - is an example of a property accessor that would be defined writeable. - -

-

-
read/write
-
The associated property can both be written and read. - The distance property use in Dijkstra's shortest paths algorithm - would need to provide both read and write capabilities. - -

-

-
lvalue
-
The associated property is actually represented in - memory and it is possible to get a reference to it. - The property accessors in the lvalue - category also support the requirements for read/write property - accessors. - -

-

-
- -

-There is a separate concept defined for each of the four property -accessor categories. These property accessor concepts are listed -below, with links to the documentation for each of them. - -

- -

-There is a tag struct for each of the categories of property -accessors, which is defined in the header -<boost/property_accessor.hpp>. - -

-

-namespace boost {
-
-  struct readable_property_accessor_tag { };
-
-  struct writable_property_accessor_tag { };
-
-  struct read_write_property_accessor_tag :
-    public readable_property_accessor_tag,
-    public writable_property_accessor_tag { };
-
-  struct lvalue_property_accessor_tag : 
-    public read_write_property_accessor_tag { };
-
-}
-
- -

-Similar to the std::iterator_traits class of the STL, there -is a boost::property_traits class that can be used to deduce -the types associated with a property accessor type: the key and value -types, and the property accessor category. There is a specialization -of boost::property_traits so that pointers can be used as -property accessor objects. In addition, the property accessor -functions are overloaded for pointers. These traits classes and -functions are defined in <boost/property_accessor.hpp>. - -

-

-namespace boost {
-
-  template <class PropertyAccessor>
-  struct property_traits {
-     typedef typename PropertyAccessor::key_type key_type;
-     typedef typename PropertyAccessor::value_type value_type;
-     typedef typename PropertyAccessor::category category;
-  };
-
-  // specialization for using pointers as property accessors
-  template <class T>
-  struct property_traits<T*> {
-    typedef T value_type;
-    typedef ptrdiff_t key_type;
-    typedef random_access_iterator_pa_tag category;
-  };
-
-  // overloads of the property accessor functions for pointers
-  template 
-  void put(T* pa, std::ptrdiff_t k, const T& val) { pa[k] = val;  }
-
-  template 
-  const T& get(const T* pa, std::ptrdiff_t k) { return pa[k]; }
-
-  template 
-  T& at(T* pa, std::ptrdiff_t k) { return pa[k]; }
-
-  template 
-  const T& at(const T* pa, std::ptrdiff_t k) { return pa[k]; }
-
-}
-
- - -

Notes to Implementors

- -Copying a property accessor should be inexpensive since they are often -passed by value. - -
-
- - -
Copyright © 2000 -Jeremy Siek, Univ.of Notre Dame (jsiek@lsc.nd.edu) -
- - - diff --git a/random_access_iterator_property_accessor.html b/random_access_iterator_property_accessor.html deleted file mode 100644 index 33b9b3b..0000000 --- a/random_access_iterator_property_accessor.html +++ /dev/null @@ -1,213 +0,0 @@ - - - -Random Access Iterator Property Accessor Adaptor - -C++ Boost - -
- - -

-
-random_access_iterator_property_accessor<Iterator,T,R,OffsetPA>
-
-

- -

-This property accessor is an adaptor that converts any random access -iterator into a LvaluePropertyAccessor. -The OffsetPA type is responsible for converting -key objects to integers that can be used as offsets with the -random access iterator. - -

- -

Example

- -
-// print out the capacity and flow for all the edges in the graph
-template <class Graph, class CapacityPA, class FlowPA>
-void print_network(Graph& G, CapacityPA capacity, FlowPA flow)
-{
-  typedef typename boost::graph_traits<Graph>::vertex_iterator    Viter;
-  typedef typename boost::graph_traits<Graph>::out_edge_iterator OutEdgeIter;
-  typedef typename boost::graph_traits<Graph>::in_edge_iterator InEdgeIter;
-
-  Viter ui, uiend;
-  for (boost::tie(ui, uiend) = vertices(G); ui != uiend; ++ui) {
-    OutEdgeIter out, out_end;
-    std::cout << *ui << "\t";
-
-    for(boost::tie(out, out_end) = out_edges(*ui, G); out != out_end; ++out)
-      std::cout << "--(" << get(capacity, *out) << ", " 
-	   << get(flow, *out) << ")--> " << target(*out,G) << "\t";
-    std::cout << std::endl << "\t";
-
-    InEdgeIter in, in_end;    
-    for(boost::tie(in, in_end) = in_edges(*ui, G); in != in_end; ++in)
-      std::cout << "<--(" << get(capacity, *in) << "," << get(flow, *in) << ")-- "
-           << source(*in,G) << "\t";
-    std::cout << std::endl;
-  }
-}
-
-int main(int, char*[])
-{
-  typedef boost::adjacency_list<boost::vecS, boost::vecS, 
-    boost::bidirectionalS, boost::no_plugin, 
-    boost::plugin<boost::id_tag, std::size_t> > Graph;
-
-  const int num_vertices = 9;
-  Graph G(num_vertices);
-
-  int capacity[] = { 10, 20, 20, 20, 40, 40, 20, 20, 20, 10 };
-  int flow[] = { 8, 12, 12, 12, 12, 12, 16, 16, 16, 8 };
-
-  // add edges to the graph, and assign each edge an ID number
-  // to index into the property arrays
-  add_edge(G, 0, 1, 0);
-  // ...
-
-  typedef boost::graph_traits<Graph>::edge_descriptor Edge;
-  typedef boost::edge_property_accessor<Graph, boost::id_tag>::type EdgeID_PA;
-  EdgeID_PA edge_id = get_edge_property_accessor(G, boost::id_tag());
-
-  boost::random_access_iterator_property_accessor<int*, int, int&, EdgeID_PA>
-     capacity_pa(capacity, edge_id),
-     flow_pa(flow, edge_id);
-
-  print_network(G, capacity_pa, flow_pa);
-          
-  return 0;
-}
-
- -

Where Defined

- -

-boost/property_accessor.hpp - -

-

Model Of

- -LvaluePropertyAccessor - -

- -

Template Parameters

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterDescriptionDefault
IteratorMust be a model of RandomAccessIterator. 
TThe value type of the iterator.std::iterator_traits<RandomAccessIterator>::value_type
RThe reference type of the iterator.std::iterator_traits<RandomAccessIterator>::reference
OffsetPA Must be a model of ReadablePropertyAccessor -and the value type must be convertible to the difference type of the -iterator. boost::identity_property_accessor
-

- -

Members

- -

-In addition the methods and functions required by LvaluePropertyAccessor, this -class has the following members. - -

- - - - - - - - - - - - - - - - - - - - - - -
MemberDescription
-value_type -This will be the same type as -std::iterator_traits<Iterator>::value_type. -
-random_access_iterator_property_accessor(Iterator i) - -Constructor. -
-reference operator[](difference_type v) const - -The operator bracket for property access. The reference and -difference_type types are from -std::iterator_traits<Iterator>. -
- - - -
-


- - -
Copyright © 2000 -Jeremy Siek, -Univ.of Notre Dame (jsiek@lsc.nd.edu)
-Lie-Quan Lee, Univ.of Notre Dame (llee1@lsc.nd.edu)
-Andrew Lumsdaine, -Univ.of Notre Dame (lums@lsc.nd.edu) -
- - -