Board 0.9.6
Classes | Namespaces | Macros | Enumerations | Functions | Variables
Tools.h File Reference

@copyright This source code is part of the Board project, a C++ library whose purpose is to allow simple drawings in EPS, FIG or SVG files. Copyright (C) 2007 Sebastien Fourey https://foureys.users.greyc.fr/ More...

#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>

Go to the source code of this file.

Classes

class  LibBoard::Tools::MessageStream
 

Namespaces

namespace  LibBoard
 
namespace  LibBoard::Tools
 

Macros

#define secured_sprintf   snprintf
 

Enumerations

enum  LibBoard::Tools::CaseSensitivity { LibBoard::Tools::CaseSensitive , LibBoard::Tools::CaseInsensitive }
 

Functions

void LibBoard::Tools::secured_strncpy (char *dst, const char *src, size_t count)
 
void LibBoard::Tools::secured_ctime (char *str, const time_t *t, size_t count)
 
bool LibBoard::Tools::base64encode (std::istream &in, std::ostream &, int linesize=80)
 
bool LibBoard::Tools::stringEndsWith (const char *str, const char *end, CaseSensitivity sensitivity=CaseSensitive)
 
void LibBoard::Tools::flushFile (const char *filename, std::ostream &out)
 
void LibBoard::Tools::getEPSBoundingBox (const char *filename, Rect &rect)
 
bool LibBoard::Tools::canCreateFile (const char *filename)
 
bool LibBoard::Tools::canReadFile (const char *filename)
 
const char * LibBoard::Tools::temporaryFilename (const char *extension)
 
void LibBoard::Tools::initBoardRand (unsigned long seed)
 
unsigned int LibBoard::Tools::boardRand ()
 
double LibBoard::Tools::boardRandDouble ()
 
double LibBoard::Tools::boardRandDouble (double min, double max)
 
bool LibBoard::Tools::almostEqual (const double &a, const double &b)
 
double LibBoard::Tools::mix (const double &a, const double &b, const double &time)
 
template<typename T >
void LibBoard::Tools::unused (const T &,...)
 
template<typename T >
void LibBoard::Tools::clamp (T &value, const T &min, const T &max)
 
template<typename T >
LibBoard::Tools::square (const T &t)
 
bool LibBoard::Tools::solveQuadratic (double a, double b, double c, double &x1, double &x2)
 
double LibBoard::Tools::rad2deg (double angle)
 
double LibBoard::Tools::deg2rad (double angle)
 

Variables

MessageStream LibBoard::Tools::error
 
MessageStream LibBoard::Tools::warning
 
MessageStream LibBoard::Tools::notice
 

Detailed Description

@copyright This source code is part of the Board project, a C++ library whose purpose is to allow simple drawings in EPS, FIG or SVG files. Copyright (C) 2007 Sebastien Fourey https://foureys.users.greyc.fr/

Author
Sebastien Fourey (GREYC)
Date
Nov 2008

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Macro Definition Documentation

◆ secured_sprintf

#define secured_sprintf   snprintf