All Downloads are FREE. Search and download functionalities are using the official Maven repository.

srcnativelibs.Vision.sikuli-debug.h Maven / Gradle / Ivy

/*
 * Copyright 2010-2014, Sikuli.org, sikulix.com
 * Released under the MIT License.
 *
 */
#ifndef _SIKULU_DEBUG_H
#define _SIKULI_DEBUG_H


#include 
#include 

namespace sikuli{
   enum DebugCategories {
      OCR, FINDER
   };
   void setDebug(DebugCategories cat, int level);

   extern int OCR_DEBUG_LEVEL;
   extern int FINDER_DEBUG_LEVEL;

   template  > 
     class basic_nullbuf: public std::basic_streambuf { 
        typename traits::int_type overflow(typename traits::int_type c) 
        { 
           return traits::not_eof(c); // indicate success 
        } 
     }; 

   template  > 
     class basic_onullstream: public std::basic_ostream { 
     public: 
        basic_onullstream(): 
           std::basic_ios(&m_sbuf), 
           std::basic_ostream(&m_sbuf) 
        { 
           this->init(&m_sbuf); 
        } 

     private: 
        basic_nullbuf m_sbuf; 
     }; 

   typedef basic_onullstream onullstream; 
   typedef basic_onullstream wonullstream; 

   std::ostream& dout(const char* name="");
   std::ostream& dhead(const char* name);

}

#endif




© 2015 - 2025 Weber Informatics LLC | Privacy Policy