Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Header only #1668

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
505 changes: 0 additions & 505 deletions src/DGtal/base/Bits.cpp

This file was deleted.

459 changes: 459 additions & 0 deletions src/DGtal/base/Bits.h

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions src/DGtal/base/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,5 @@
/** DGtal Global variables
*
**/
namespace DGtal
{

#ifndef NDEBUG
#ifdef __linux__
#ifdef DGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS
void beforeMain (void) __attribute__((constructor));
void beforeMain (void)
{
feenableexcept ( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
}
#endif
#endif
#endif

TraceWriterTerm traceWriterTerm(std::cerr);
Trace trace(traceWriterTerm);
}
// //
///////////////////////////////////////////////////////////////////////////////
19 changes: 19 additions & 0 deletions src/DGtal/base/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,25 @@ void setStyle( Board3DTo2D< S, KS> & ) const {}

} // namespace DGtal

namespace DGtal
{

#ifndef NDEBUG
#ifdef __linux__
#ifdef DGTAL_ENABLE_FLOATING_POINT_EXCEPTIONS
inline void beforeMain (void) __attribute__((constructor));
inline void beforeMain (void)
{
feenableexcept ( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
}
#endif
#endif
#endif

TraceWriterTerm traceWriterTerm(std::cerr);
Trace trace(traceWriterTerm);
}


// //
///////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions src/DGtal/base/ModuleSRC.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

set(DGTAL_SRC ${DGTAL_SRC}
DGtal/base/Bits.cpp
DGtal/base/Common.cpp)

)

246 changes: 0 additions & 246 deletions src/DGtal/io/Color.cpp

This file was deleted.

26 changes: 25 additions & 1 deletion src/DGtal/io/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ namespace DGtal
*/

Color( const unsigned int aRgb,
unsigned char aAlpha = 255 );
unsigned char aAlpha = 255 )
:myAlpha( aAlpha )
{
myRed = ( aRgb & 0xFF0000u ) >> 16;
myGreen = ( aRgb & 0xFF00u ) >> 8;
myBlue = aRgb & 0xFF;
}

/**
* Copy Constructor.
Expand Down Expand Up @@ -516,6 +522,24 @@ namespace DGtal
std::ostream&
operator<< ( std::ostream & out, const Color & aColor );

///////////////////////////////////////////////////////////////////////////////
// Interface - public :

const DGtal::Color DGtal::Color::None(0,0,0,0);
const DGtal::Color DGtal::Color::Black((unsigned char)0,(unsigned char)0,(unsigned char)0);
const DGtal::Color DGtal::Color::Gray((unsigned char)128,(unsigned char)128,(unsigned char)128);
const DGtal::Color DGtal::Color::White((unsigned char)255,(unsigned char)255,(unsigned char)255);
const DGtal::Color DGtal::Color::Red((unsigned char)255,(unsigned char)0,(unsigned char)0);
const DGtal::Color DGtal::Color::Green((unsigned char)0,(unsigned char)255,(unsigned char)0);
const DGtal::Color DGtal::Color::Lime((unsigned char)0,(unsigned char)255,(unsigned char)0);
const DGtal::Color DGtal::Color::Blue((unsigned char)0,(unsigned char)0,(unsigned char)255);
const DGtal::Color DGtal::Color::Cyan((unsigned char)0,(unsigned char)255,(unsigned char)255);
const DGtal::Color DGtal::Color::Magenta((unsigned char)255,(unsigned char)0,(unsigned char)255);
const DGtal::Color DGtal::Color::Yellow((unsigned char)255,(unsigned char)255,(unsigned char)0);
const DGtal::Color DGtal::Color::Silver((unsigned char)190,(unsigned char)190,(unsigned char)190);
const DGtal::Color DGtal::Color::Purple((unsigned char)128,(unsigned char)0,(unsigned char)128);
const DGtal::Color DGtal::Color::Navy((unsigned char)0,(unsigned char)0,(unsigned char)128);
const DGtal::Color DGtal::Color::Aqua((unsigned char)0,(unsigned char)255,(unsigned char)255);

} // namespace DGtal

Expand Down
Loading