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

          Line data    Source code
       1             : #ifndef AS2JS_POSITION_H
       2             : #define AS2JS_POSITION_H
       3             : /* position.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             : #include    "string.h"
      39             : 
      40             : 
      41             : namespace as2js
      42             : {
      43             : 
      44             : 
      45             : 
      46   361585118 : class Position
      47             : {
      48             : public:
      49             :     typedef int32_t     counter_t;
      50             :     typedef controlled_vars::auto_init<counter_t, 1>    zcounter_t;
      51             : 
      52             : //                        Position();
      53             : //                        Position(Position const& rhs);
      54             : //
      55             : //    Position&           operator = (Position const& rhs);
      56             : 
      57             :     void                set_filename(String const& filename);
      58             :     void                set_function(String const& function);
      59             :     void                reset_counters(counter_t line = 1);
      60             :     void                new_page();
      61             :     void                new_paragraph();
      62             :     void                new_line();
      63             : 
      64             :     String              get_filename() const;
      65             :     String              get_function() const;
      66             :     counter_t           get_page() const;
      67             :     counter_t           get_page_line() const;
      68             :     counter_t           get_paragraph() const;
      69             :     counter_t           get_line() const;
      70             : 
      71             : private:
      72             :     String              f_filename;
      73             :     String              f_function;
      74             :     zcounter_t          f_page;
      75             :     zcounter_t          f_page_line;
      76             :     zcounter_t          f_paragraph;
      77             :     zcounter_t          f_line;
      78             : };
      79             : 
      80             : std::ostream& operator << (std::ostream& out, Position const& pos);
      81             : 
      82             : 
      83             : }
      84             : // namespace as2js
      85             : #endif
      86             : // #ifndef AS2JS_POSITION_H
      87             : 
      88             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.10