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

okteta

  • KDE
  • NumberRange
Public Member Functions | Static Public Member Functions | List of all members
KDE::NumberRange< N, S > Class Template Reference

#include <numberrange.h>

Inheritance diagram for KDE::NumberRange< N, S >:
Inheritance graph
[legend]

Public Member Functions

 NumberRange (N startIndex, N endIndex)
 
 NumberRange (const NumberRange &other)
 
 NumberRange ()
 
 ~NumberRange ()
 
void adaptToReplacement (N offset, S removedLength, S insertedLength)
 
bool append (const NumberRange &other)
 
bool isJoinable (const NumberRange &other) const
 
N localIndex (N index) const
 
NumberRange localRange (const NumberRange &other) const
 
void moveToEnd (N end)
 
void moveToStart (N other)
 
N nextBeforeStart () const
 
N nextBehindEnd () const
 
NumberRange & operator= (const NumberRange &other)
 
bool operator== (const NumberRange &other) const
 
bool prepend (const NumberRange &other)
 
NumberRange remove (const NumberRange &removeRange)
 
NumberRange removeLocal (const NumberRange &removeRange)
 
void restrictEndByWidth (S width)
 
void setByWidth (N other, S width)
 
void setEndByWidth (S width)
 
void setEndNextBefore (const NumberRange &other)
 
void setEndNextBefore (N index)
 
void setStartByWidth (S width)
 
void setStartNextBehind (const NumberRange &other)
 
void setStartNextBehind (N index)
 
NumberRange splitAt (N index)
 
NumberRange splitAtLocal (N index)
 
N startForInclude (const NumberRange &other) const
 
NumberRange subRange (const NumberRange &localRange) const
 
S width () const
 
- Public Member Functions inherited from KDE::Range< N >
 Range (NS, NE)
 
 Range ()
 
 ~Range ()
 
N end () const
 
bool endsBefore (NValue) const
 
bool endsBefore (const Range &R) const
 
bool endsBehind (NValue) const
 
bool endsBehind (const Range &R) const
 
void extendEndTo (NLimit)
 
void extendStartTo (NLimit)
 
void extendTo (const Range &Limit)
 
bool includes (NValue) const
 
bool includes (const Range &R) const
 
bool includesInside (NValue) const
 
bool includesInside (const Range &R) const
 
bool isEmpty () const
 
bool isValid () const
 
void moveBy (ND)
 
void moveEndBy (ND)
 
void moveStartBy (ND)
 
Range & operator= (const Range &R)
 
bool operator== (const Range &R) const
 
bool overlaps (const Range &R) const
 
void restrictEndTo (NLimit)
 
void restrictStartTo (NLimit)
 
void restrictTo (const Range &Limit)
 
void set (NS, NE)
 
void set (const Range &R)
 
void setEnd (NE)
 
void setStart (NS)
 
N start () const
 
bool startsBefore (NValue) const
 
bool startsBefore (const Range &R) const
 
bool startsBehind (NValue) const
 
bool startsBehind (const Range &R) const
 
void unset ()
 

Static Public Member Functions

static NumberRange fromWidth (N startIndex, S width)
 
static NumberRange fromWidth (S width)
 

Additional Inherited Members

- Protected Member Functions inherited from KDE::Range< N >
const N null () const
 
- Protected Attributes inherited from KDE::Range< N >
N End
 
N Start
 

Detailed Description

template<typename N, typename S = N>
class KDE::NumberRange< N, S >

describes a range of numbers which have a distance of 1 each

Author
Friedrich W. H. Kossebau

Definition at line 37 of file numberrange.h.

Constructor & Destructor Documentation

template<typename N, typename S = N>
KDE::NumberRange< N, S >::NumberRange ( N  startIndex,
N  endIndex 
)
inline

constructs a range

Parameters
startIndexstarting index
endIndexend index

Definition at line 53 of file numberrange.h.

template<typename N, typename S = N>
KDE::NumberRange< N, S >::NumberRange ( const NumberRange< N, S > &  other)
inline

Definition at line 54 of file numberrange.h.

template<typename N, typename S = N>
KDE::NumberRange< N, S >::NumberRange ( )
inline

Definition at line 55 of file numberrange.h.

template<typename N, typename S = N>
KDE::NumberRange< N, S >::~NumberRange ( )
inline

Definition at line 57 of file numberrange.h.

Member Function Documentation

template<typename N, typename S>
void KDE::NumberRange< N, S >::adaptToReplacement ( N  offset,
S  removedLength,
S  insertedLength 
)
inline

Definition at line 226 of file numberrange.h.

template<typename N , typename S >
bool KDE::NumberRange< N, S >::append ( const NumberRange< N, S > &  other)
inline

Definition at line 222 of file numberrange.h.

template<typename N, typename S>
NumberRange< N, S > KDE::NumberRange< N, S >::fromWidth ( N  startIndex,
S  width 
)
inlinestatic

constructs a range by width

Parameters
startIndexstarting index
widthwidth of the range

Definition at line 130 of file numberrange.h.

template<typename N, typename S>
NumberRange< N, S > KDE::NumberRange< N, S >::fromWidth ( S  width)
inlinestatic

Definition at line 132 of file numberrange.h.

template<typename N , typename S >
bool KDE::NumberRange< N, S >::isJoinable ( const NumberRange< N, S > &  other) const
inline
Returns
true if both range . If one of both is invalid the behaviour is undefined

Definition at line 215 of file numberrange.h.

template<typename N, typename S >
N KDE::NumberRange< N, S >::localIndex ( N  index) const
inline
Returns
index relative to the start

Definition at line 199 of file numberrange.h.

template<typename N , typename S >
NumberRange< N, S > KDE::NumberRange< N, S >::localRange ( const NumberRange< N, S > &  other) const
inline

Definition at line 201 of file numberrange.h.

template<typename N, typename S >
void KDE::NumberRange< N, S >::moveToEnd ( N  end)
inline

moves the range defined by a new end.

If the range is invalid the behaviour is undefined

Definition at line 167 of file numberrange.h.

template<typename N, typename S >
void KDE::NumberRange< N, S >::moveToStart ( N  other)
inline

moves the range defined by a new start.

If the range is invalid the behaviour is undefined

Definition at line 165 of file numberrange.h.

template<typename N , typename S >
N KDE::NumberRange< N, S >::nextBeforeStart ( ) const
inline

Definition at line 143 of file numberrange.h.

template<typename N , typename S >
N KDE::NumberRange< N, S >::nextBehindEnd ( ) const
inline

Definition at line 145 of file numberrange.h.

template<typename N , typename S >
NumberRange< N, S > & KDE::NumberRange< N, S >::operator= ( const NumberRange< N, S > &  other)
inline

Definition at line 138 of file numberrange.h.

template<typename N , typename S >
bool KDE::NumberRange< N, S >::operator== ( const NumberRange< N, S > &  other) const
inline

Definition at line 135 of file numberrange.h.

template<typename N , typename S >
bool KDE::NumberRange< N, S >::prepend ( const NumberRange< N, S > &  other)
inline

Definition at line 219 of file numberrange.h.

template<typename N , typename S >
NumberRange< N, S > KDE::NumberRange< N, S >::remove ( const NumberRange< N, S > &  removeRange)
inline

Definition at line 184 of file numberrange.h.

template<typename N , typename S >
NumberRange< N, S > KDE::NumberRange< N, S >::removeLocal ( const NumberRange< N, S > &  removeRange)
inline

Definition at line 191 of file numberrange.h.

template<typename N , typename S>
void KDE::NumberRange< N, S >::restrictEndByWidth ( S  width)
inline

restricts the end by width.

If the range is invalid the behaviour is undefined

Definition at line 162 of file numberrange.h.

template<typename N, typename S>
void KDE::NumberRange< N, S >::setByWidth ( N  other,
S  width 
)
inline

Definition at line 148 of file numberrange.h.

template<typename N , typename S>
void KDE::NumberRange< N, S >::setEndByWidth ( S  width)
inline

sets the last index of the range's range to be width-1 behind the start If the range is invalid the behaviour is undefined

Definition at line 152 of file numberrange.h.

template<typename N , typename S >
void KDE::NumberRange< N, S >::setEndNextBefore ( const NumberRange< N, S > &  other)
inline

sets the first index of the range's range one behind the other's end If one of both is invalid or the other' start is 0 the behaviour is undefined

Definition at line 158 of file numberrange.h.

template<typename N, typename S >
void KDE::NumberRange< N, S >::setEndNextBefore ( N  index)
inline

Definition at line 160 of file numberrange.h.

template<typename N , typename S>
void KDE::NumberRange< N, S >::setStartByWidth ( S  width)
inline

sets the first index of the range's range to be width-1 before the end If the range is invalid the behaviour is undefined

Definition at line 150 of file numberrange.h.

template<typename N , typename S >
void KDE::NumberRange< N, S >::setStartNextBehind ( const NumberRange< N, S > &  other)
inline

sets the first index of the range's range one behind the other's end If one of both is invalid the behaviour is undefined

Definition at line 154 of file numberrange.h.

template<typename N, typename S >
void KDE::NumberRange< N, S >::setStartNextBehind ( N  index)
inline

Definition at line 156 of file numberrange.h.

template<typename N, typename S >
NumberRange< N, S > KDE::NumberRange< N, S >::splitAt ( N  index)
inline

Definition at line 170 of file numberrange.h.

template<typename N, typename S >
NumberRange< N, S > KDE::NumberRange< N, S >::splitAtLocal ( N  index)
inline

Definition at line 177 of file numberrange.h.

template<typename N , typename S >
N KDE::NumberRange< N, S >::startForInclude ( const NumberRange< N, S > &  other) const
inline
Returns
the needed start so that other gets included, undefined if any is invalid

Definition at line 208 of file numberrange.h.

template<typename N , typename S >
NumberRange< N, S > KDE::NumberRange< N, S >::subRange ( const NumberRange< N, S > &  localRange) const
inline
Returns
range given by local

Definition at line 204 of file numberrange.h.

template<typename N , typename S >
S KDE::NumberRange< N, S >::width ( ) const
inline
Returns
the numbered of included indizes or 0, if the range is invalid

Definition at line 141 of file numberrange.h.


The documentation for this class was generated from the following file:
  • numberrange.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