Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# TemplateTable< TEMPLATES_MAX, POINT_RES > Class Template Reference

The class realizes a table of template poses. More...

`#include <LinesTables2004.h>`

Inheritance diagram for TemplateTable< TEMPLATES_MAX, POINT_RES >:

[legend]
Collaboration diagram for TemplateTable< TEMPLATES_MAX, POINT_RES >:

[legend]
List of all members.

## Public Member Functions
void | create (const Field &field, LinesPercept::LineType type)
| The function creates the table.
Pose2D | sample (double realDist) const
| The function draws a pose from the templates for a certain distance.
void | write (Out &stream) const
| The function writes the contents of an object to a stream.
void | read (In &stream)
| The function reads the contents of an object from a stream.
## Private Types
enum | { DISTANCE_MAX = 650 }
## Static Private Member Functions
int | compare (const Temp *t1, const Temp *t2)
| The function is required for sorting the template poses.
## Private Attributes
char | templates [TEMPLATES_MAX][3]
| The template poses sorted by distance.
unsigned short | distance [DISTANCE_MAX+1]
| Indices into the template table depending on the distance.

## Detailed Description

### template<int TEMPLATES_MAX, int POINT_RES>
class TemplateTable< TEMPLATES_MAX, POINT_RES >

The class realizes a table of template poses.

Definition at line 169 of file LinesTables2004.h.

## Member Enumeration Documentation

template<int TEMPLATES_MAX, int POINT_RES>
anonymous enum`[private]`

  | Enumeration values:
  DISTANCE_MAX | The number of distances.
Definition at line 181 of file LinesTables2004.h.

## Member Function Documentation

template<int TEMPLATES_MAX, int POINT_RES>
int TemplateTable< TEMPLATES_MAX, POINT_RES >::compare | ( | const Temp * | t1,
|  | const Temp * | t2
| ) | `[inline, static, private]`

  | The function is required for sorting the template poses. It is used as compare function for qsort. Parameters:
  t1 | The first element to compare.
  t2 | The second element to compare.
Returns: -1, 0, or 1 according to the specification required by qsort. Definition at line 200 of file LinesTables2004.h.

template<int TEMPLATES_MAX, int POINT_RES>
void TemplateTable< TEMPLATES_MAX, POINT_RES >::create | ( | const Field & | field,
|  | LinesPercept::LineType | type
| ) | `[inline]`

  | The function creates the table. It must be called for construction. Parameters:
  field | The field.
  type | The line type the table will be constructed for.
Definition at line 212 of file LinesTables2004.h. Referenced by LinesTables2004::LinesTables2004(), and LinesTables2005::LinesTables2005().

template<int TEMPLATES_MAX, int POINT_RES>
Pose2D TemplateTable< TEMPLATES_MAX, POINT_RES >::sample | ( | double | realDist | ) | const`[inline]`

  | The function draws a pose from the templates for a certain distance. Parameters:
  realDist | The distance in which a line starting from the pose should cut the closest field line.
Returns: A pose drawn from the table. Definition at line 259 of file LinesTables2004.h.

template<int TEMPLATES_MAX, int POINT_RES>
void TemplateTable< TEMPLATES_MAX, POINT_RES >::write | ( | Out & | stream | ) | const`[inline, virtual]`

  | The function writes the contents of an object to a stream. Parameters:
  stream | The stream the data is written to.
Implements TemplateTableBase. Definition at line 272 of file LinesTables2004.h.

template<int TEMPLATES_MAX, int POINT_RES>
void TemplateTable< TEMPLATES_MAX, POINT_RES >::read | ( | In & | stream | ) | `[inline, virtual]`

  | The function reads the contents of an object from a stream. Parameters:
  stream | The stream the data is read from.
Implements TemplateTableBase. Definition at line 278 of file LinesTables2004.h.

## Member Data Documentation

template<int TEMPLATES_MAX, int POINT_RES>
char TemplateTable< TEMPLATES_MAX, POINT_RES >::templates[TEMPLATES_MAX][3]`[private]`

| The template poses sorted by distance. Definition at line 190 of file LinesTables2004.h.

template<int TEMPLATES_MAX, int POINT_RES>
unsigned short TemplateTable< TEMPLATES_MAX, POINT_RES >::distance[DISTANCE_MAX + 1]`[private]`

| Indices into the template table depending on the distance. Definition at line 191 of file LinesTables2004.h.

The documentation for this class was generated from the following file:

- Modules/SelfLocator/LinesTables2004.h