• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

kdecore

krandomsequence.h

00001 /* This file is part of the KDE libraries
00002    Copyright (c) 1999 Sean Harmer <sh@astro.keele.ac.uk>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 #ifndef K_RANDOM_SEQUENCE_H
00019 #define K_RANDOM_SEQUENCE_H
00020 
00021 #include "kdelibs_export.h"
00022 
00023 class KRandomSequencePrivate;
00024 class QGList;
00039 class KDECORE_EXPORT KRandomSequence
00040 {
00041 public: 
00055   KRandomSequence( long lngSeed = 0 );
00056 
00060   virtual ~KRandomSequence();
00061 
00065   KRandomSequence(const KRandomSequence &a);
00066   
00070   KRandomSequence &operator=(const KRandomSequence &a);
00071 
00078   void setSeed( long lngSeed = 0 );
00079 
00085   double getDouble(); 
00086   
00093   unsigned long getLong(unsigned long max); 
00094 
00100   bool getBool(); 
00101 
00107   void randomize(QGList *list);
00108 
00130   void modulate(int i);
00131     
00132 private:
00133   void Draw(); // Generate the random number
00134   long m_lngSeed1;
00135   long m_lngSeed2;
00136   long m_lngShufflePos;
00137 
00138   static const int    m_nShuffleTableSize;
00139   long *m_ShuffleArray;
00140 
00141   KRandomSequencePrivate *d;
00142 };
00143 
00144 #endif
00145 

kdecore

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

@topname@

Skip menu "@topname@"
  •     kdnssd-avahi
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for @topname@ by doxygen 1.5.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal