LCOV - code coverage report
Current view: top level - include/as2js - compare.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 2 100.0 %
Date: 2014-11-22 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef AS2JS_COMPARE_H
       2             : #define AS2JS_COMPARE_H
       3             : /* compare.h -- written by Alexis WILKE for Made to Order Software Corp. (c) 2005-2014 */
       4             : 
       5             : /*
       6             : 
       7             : Copyright (c) 2005-2014 Made to Order Software Corp.
       8             : 
       9             : http://snapwebsites.org/project/as2js
      10             : 
      11             : Permission is hereby granted, free of charge, to any
      12             : person obtaining a copy of this software and
      13             : associated documentation files (the "Software"), to
      14             : deal in the Software without restriction, including
      15             : without limitation the rights to use, copy, modify,
      16             : merge, publish, distribute, sublicense, and/or sell
      17             : copies of the Software, and to permit persons to whom
      18             : the Software is furnished to do so, subject to the
      19             : following conditions:
      20             : 
      21             : The above copyright notice and this permission notice
      22             : shall be included in all copies or substantial
      23             : portions of the Software.
      24             : 
      25             : THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
      26             : ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
      27             : LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
      28             : FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
      29             : EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
      30             : LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
      31             : WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
      32             : ARISING FROM, OUT OF OR IN CONNECTION WITH THE
      33             : SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
      34             : SOFTWARE.
      35             : 
      36             : */
      37             : 
      38             : 
      39             : namespace as2js
      40             : {
      41             : 
      42             : 
      43             : enum class compare_t
      44             : {
      45             :         COMPARE_EQUAL = 0,
      46             :         COMPARE_GREATER = 1,
      47             :         COMPARE_LESS = -1,
      48             :         COMPARE_UNORDERED = 2,
      49             :         COMPARE_ERROR = -2,
      50             :         COMPARE_UNDEFINED = -3          // not yet compared
      51             : };
      52             : 
      53             : 
      54             : namespace compare_utils
      55             : {
      56       40000 : inline bool is_ordered(compare_t const c)
      57             : {
      58       40000 :     return c == compare_t::COMPARE_EQUAL || c == compare_t::COMPARE_GREATER || c == compare_t::COMPARE_LESS;
      59             : }
      60             : }
      61             : // namespace compare
      62             : 
      63             : }
      64             : // namespace as2js
      65             : #endif
      66             : // #ifndef AS2JS_COMPARE_H
      67             : 
      68             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.10