• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • KDE
  • Range
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KDE::Range< T > Class Template Reference

#include <range.h>

Inheritance diagram for KDE::Range< T >:
Inheritance graph
[legend]

Public Member Functions

 Range (T S, T E)
 
 Range ()
 
 ~Range ()
 
T end () const
 
bool endsBefore (T Value) const
 
bool endsBefore (const Range &R) const
 
bool endsBehind (T Value) const
 
bool endsBehind (const Range &R) const
 
void extendEndTo (T Limit)
 
void extendStartTo (T Limit)
 
void extendTo (const Range &Limit)
 
bool includes (T Value) const
 
bool includes (const Range &R) const
 
bool includesInside (T Value) const
 
bool includesInside (const Range &R) const
 
bool isEmpty () const
 
bool isValid () const
 
void moveBy (T D)
 
void moveEndBy (T D)
 
void moveStartBy (T D)
 
Range & operator= (const Range &R)
 
bool operator== (const Range &R) const
 
bool overlaps (const Range &R) const
 
void restrictEndTo (T Limit)
 
void restrictStartTo (T Limit)
 
void restrictTo (const Range &Limit)
 
void set (T S, T E)
 
void set (const Range &R)
 
void setEnd (T E)
 
void setStart (T S)
 
T start () const
 
bool startsBefore (T Value) const
 
bool startsBefore (const Range &R) const
 
bool startsBehind (T Value) const
 
bool startsBehind (const Range &R) const
 
void unset ()
 

Protected Member Functions

const T null () const
 

Protected Attributes

T End
 
T Start
 

Detailed Description

template<typename T>
class KDE::Range< T >

This template describes a range.

A range is something with a start and an end. The start is a value relative before the end. The distance cannot be estimated.

Author
Friedrich W. H. Kossebau

Definition at line 38 of file range.h.

Constructor & Destructor Documentation

template<typename T>
KDE::Range< T >::Range ( T  S,
T  E 
)
inline

Definition at line 41 of file range.h.

template<typename T>
KDE::Range< T >::Range ( )
inline

Definition at line 42 of file range.h.

template<typename T>
KDE::Range< T >::~Range ( )
inline

Definition at line 43 of file range.h.

Member Function Documentation

template<typename T>
T KDE::Range< T >::end ( ) const
inline
Returns
end

Definition at line 88 of file range.h.

template<typename T>
bool KDE::Range< T >::endsBefore ( T  Value) const
inline

returns true if range is before index.

if range is invalid the behaviour is undefined

Definition at line 103 of file range.h.

template<typename T>
bool KDE::Range< T >::endsBefore ( const Range< T > &  R) const
inline

returns true is the range ends before R starts.

If one of both is invalid the behaviour is undefined

Definition at line 110 of file range.h.

template<typename T>
bool KDE::Range< T >::endsBehind ( T  Value) const
inline

returns true if the range ends later than index.

If the range is invalid the behaviour is undefined

Definition at line 101 of file range.h.

template<typename T>
bool KDE::Range< T >::endsBehind ( const Range< T > &  R) const
inline

returns true is the range ends later than R.

If one of both is invalid the behaviour is undefined

Definition at line 116 of file range.h.

template<typename T>
void KDE::Range< T >::extendEndTo ( T  Limit)
inline

extends the end to Limit.

If the range is invalid the behaviour is undefined

Definition at line 76 of file range.h.

template<typename T>
void KDE::Range< T >::extendStartTo ( T  Limit)
inline

extends the start to Limit.

If the range is invalid the behaviour is undefined

Definition at line 74 of file range.h.

template<typename T>
void KDE::Range< T >::extendTo ( const Range< T > &  Limit)
inline

extends the range to Limit.

If one of both is invalid the behaviour is undefined

Definition at line 71 of file range.h.

template<typename T>
bool KDE::Range< T >::includes ( T  Value) const
inline

returns true if Value is covered

Definition at line 93 of file range.h.

template<typename T>
bool KDE::Range< T >::includes ( const Range< T > &  R) const
inline

returns true is the range covers R.

If one of both is invalid the behaviour is undefined

Definition at line 106 of file range.h.

template<typename T>
bool KDE::Range< T >::includesInside ( T  Value) const
inline

returns true if Value is covered and not at a side

Definition at line 95 of file range.h.

template<typename T>
bool KDE::Range< T >::includesInside ( const Range< T > &  R) const
inline

returns true is the range covers R.

If one of both is invalid the behaviour is undefined

Definition at line 108 of file range.h.

template<typename T>
bool KDE::Range< T >::isEmpty ( ) const
inline

returns true if the range has not been set

Definition at line 124 of file range.h.

template<typename T>
bool KDE::Range< T >::isValid ( ) const
inline

returns true if the range covers at least one index

Definition at line 122 of file range.h.

template<typename T>
void KDE::Range< T >::moveBy ( T  D)
inline

moves the range by D.

If the range is invalid the behaviour is undefined

Definition at line 82 of file range.h.

template<typename T>
void KDE::Range< T >::moveEndBy ( T  D)
inline

moves the end by D.

If the range is invalid the behaviour is undefined

Definition at line 80 of file range.h.

template<typename T>
void KDE::Range< T >::moveStartBy ( T  D)
inline

moves the start by D.

If the range is invalid the behaviour is undefined

Definition at line 78 of file range.h.

const Okteta::Coord KDE::KBaseCoordRange::null ( ) const
inlineprotected

delivers a null element.

Should be specialiced for complexer types.

Definition at line 129 of file range.h.

template<typename T>
Range& KDE::Range< T >::operator= ( const Range< T > &  R)
inline

Definition at line 46 of file range.h.

template<typename T>
bool KDE::Range< T >::operator== ( const Range< T > &  R) const
inline

Definition at line 49 of file range.h.

template<typename T>
bool KDE::Range< T >::overlaps ( const Range< T > &  R) const
inline

returns true is the range shares at least one index with R.

If one of both is invalid the behaviour is undefined

Definition at line 118 of file range.h.

template<typename T>
void KDE::Range< T >::restrictEndTo ( T  Limit)
inline

restricts the end to Limit.

If the range is invalid the behaviour is undefined

Definition at line 69 of file range.h.

template<typename T>
void KDE::Range< T >::restrictStartTo ( T  Limit)
inline

restricts the start to Limit.

If the range is invalid the behaviour is undefined

Definition at line 67 of file range.h.

template<typename T>
void KDE::Range< T >::restrictTo ( const Range< T > &  Limit)
inline

restricts the range to Limit.

If one of both ranges is invalid the behaviour is undefined

Definition at line 64 of file range.h.

template<typename T>
void KDE::Range< T >::set ( T  S,
T  E 
)
inline

sets the first and the last index of the range

Definition at line 54 of file range.h.

template<typename T>
void KDE::Range< T >::set ( const Range< T > &  R)
inline

sets the first and the last index of the range

Definition at line 56 of file range.h.

template<typename T>
void KDE::Range< T >::setEnd ( T  E)
inline

sets the last index of the range

Definition at line 60 of file range.h.

template<typename T>
void KDE::Range< T >::setStart ( T  S)
inline

sets the first index of the range

Definition at line 58 of file range.h.

template<typename T>
T KDE::Range< T >::start ( ) const
inline
Returns
start

Definition at line 86 of file range.h.

template<typename T>
bool KDE::Range< T >::startsBefore ( T  Value) const
inline

returns true is the range starts before index.

If the range is invalid the behaviour is undefined

Definition at line 99 of file range.h.

template<typename T>
bool KDE::Range< T >::startsBefore ( const Range< T > &  R) const
inline

returns true is the range starts prior than R.

If one of both is invalid the behaviour is undefined

Definition at line 114 of file range.h.

template<typename T>
bool KDE::Range< T >::startsBehind ( T  Value) const
inline

returns true if range is behind index.

if range is invalid the behaviour is undefined

Definition at line 97 of file range.h.

template<typename T>
bool KDE::Range< T >::startsBehind ( const Range< T > &  R) const
inline

returns true is the range starts later than R ends.

If one of both is invalid the behaviour is undefined

Definition at line 112 of file range.h.

template<typename T>
void KDE::Range< T >::unset ( )
inline

sets the range to null

Definition at line 62 of file range.h.

Member Data Documentation

template<typename T>
T KDE::Range< T >::End
protected

last value of the range

Definition at line 135 of file range.h.

template<typename T>
T KDE::Range< T >::Start
protected

first value of the range

Definition at line 133 of file range.h.


The documentation for this class was generated from the following files:
  • range.h
  • coordrange.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal