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

rs Namespace Reference

I put all my code into this namespace. More...


Compounds

class  Pixel
 Reference to a pixel inside a Bmp. More...

class  Bmp
 a windows bitmap (might be loaded and saved). More...

class  Lnk
 Determine target and validity of Win9x link files (*.lnk). More...

class  Terminator
 installs a terminator. More...

class  Counted
 A counted pointer to T (used by SmartPtr). More...

class  SmartPtr
class  Timer

Typedefs

typedef unsigned int UINT32
typedef unsigned short UINT16

Functions

BmphalfBmp (const Bmp &bmp)
string COPYRIGHT_BY ()
 used by other lib-parts when printing a copyright info. More...

string MAIL_CONTACT (const string &)
std::string MAIL_CONTACT (const std::string &progname)
 used by other lib-parts when printing my email address. More...

void handle_exception (exception &e)
 cerr printing exception handler. More...

string assertionText (const char *bed, const char *file, int line)
 used by assert macros to print the assertion failure. More...

template<class T> bool operator== (const SmartPtr< T > &s1, const SmartPtr< T > &s2)
template<class T> bool operator!= (const SmartPtr< T > &s1, const SmartPtr< T > &s2)

Variables

const long max_distance = 255L*255L


Detailed Description

I put all my code into this namespace.

Typedef Documentation

typedef unsigned int UINT32
 

Definition at line 34 of file Bmp.h.

Referenced by Bmp::Bmp(), Bmp::down(), Bmp::getPixel(), Bmp::getPositions(), Bmp::left(), Bmp::pixelPointer(), Bmp::right(), Bmp::setPixel(), Bmp::up(), write_UINT32(), Bmp::Xsize(), and Bmp::Ysize().

typedef unsigned short UINT16
 

Definition at line 35 of file Bmp.h.

Referenced by Bmp::Bmp(), and write_UINT16().


Function Documentation

Bmp * halfBmp const Bmp   bmp
 

Definition at line 346 of file Bmp.cpp.

std::string COPYRIGHT_BY  
 

used by other lib-parts when printing a copyright info.

Returns:
name of programmer/company (whatever you like)
See also:
MAIL_CONTACT for how to customize this

Definition at line 6 of file Ex_mail_contact.cpp.

Referenced by ProgramInfo::infos().

string MAIL_CONTACT const string &   
 

Definition at line 9 of file Ex_mail_contact.cpp.

Referenced by InternalError::get_print_message(), and ProgramInfo::infos().

std::string MAIL_CONTACT const std::string &    progname
 

used by other lib-parts when printing my email address.

Parameters:
progname  name of current program (I use this to set the email-recipient to progname)
Returns:
email address
Warning:
COPYRIGHT_BY() and MAIL_CONTACT() are not included in the lib-binary. You'll have to define them by one of two ways:
  • Change COPYRIGHT_BY and MAIL_CONTACT (in mail_contact.cpp) to fit your needs and build librs_mail_contact.a
  • A more easy way to get it to work, is to insert the following block into each of your programs:
#include <Option.h>

using namespace std;

namespace rs {
    string COPYRIGHT_BY() {
        return "Mr.Nobody";
    }
    string MAIL_CONTACT(const string& /*progname*/) {
        return "mr.nobody@domain.de";
    }
};

Definition at line 34 of file mail_contact.cpp.

void handle_exception std::exception &    e
 

cerr printing exception handler.

Usage example:
        Terminator my_terminator;

        int main(void) {
        try {

        return EXIT_SUCCESS;
        }
        catch (exception& e) { handle_exception(e); }
        catch (...) { Error e("Unknown exception"); e.print(cerr); }

        return EXIT_FAILURE;
        }

Definition at line 42 of file rs_assert.cpp.

std::string assertionText const char *    bed,
const char *    file,
int    line
 

used by assert macros to print the assertion failure.

Definition at line 29 of file rsdef.cpp.

bool operator== const SmartPtr< T > &    s1,
const SmartPtr< T > &    s2
 

Definition at line 144 of file smartptr.h.

bool operator!= const SmartPtr< T > &    s1,
const SmartPtr< T > &    s2
 

Definition at line 148 of file smartptr.h.


Variable Documentation

const long max_distance = 255L*255L
 

Definition at line 37 of file Bmp.h.


Contact me in case of errors or questions.
This documentation is powered by Doxygen.
(C) 2000-2002 Doxygen