-
+ E3BE39BF368B3C2DD2ACF73AD9C11F30921C8E861DB51629F796A64327649A99D49BDF9269F06AD3C1094ADDFF8BE6FA739AA7A5921DC937095E20D10E79C558
bitcoin/src/json/json_spirit_error_position.h
(0 . 0)(1 . 85)
7183 // /****************************\
7184 // * EXPERIMENTAL BRANCH. *
7185 // * FOR LABORATORY USE ONLY. *
7186 // ********************************
7187 // ************
7188 // **************
7189 // ****************
7190 // **** **** ****
7191 // *** *** ***
7192 // *** *** ***
7193 // *** * * **
7194 // ******** ********
7195 // ******* ******
7196 // *** **
7197 // * ******* **
7198 // ** * * * * *
7199 // ** * * ***
7200 // **** * * * * ****
7201 // **** *** * * ** ***
7202 // **** ********* ******
7203 // ******* ***** *******
7204 // ********* ****** **
7205 // ** ****** ******
7206 // ** ******* **
7207 // ** ******* ***
7208 // **** ******** ************
7209 // ************ ************
7210 // ******** *******
7211 // ****** ****
7212 // *** ***
7213 // ********************************
7214 #ifndef JSON_SPIRIT_ERROR_POSITION
7215 #define JSON_SPIRIT_ERROR_POSITION
7216
7217 // Copyright John W. Wilkinson 2007 - 2009.
7218 // Distributed under the MIT License, see accompanying file LICENSE.txt
7219
7220 // json spirit version 4.03
7221
7222 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
7223 # pragma once
7224 #endif
7225
7226 #include <string>
7227
7228 namespace json_spirit
7229 {
7230 // An Error_position exception is thrown by the "read_or_throw" functions below on finding an error.
7231 // Note the "read_or_throw" functions are around 3 times slower than the standard functions "read"
7232 // functions that return a bool.
7233 //
7234 struct Error_position
7235 {
7236 Error_position();
7237 Error_position( unsigned int line, unsigned int column, const std::string& reason );
7238 bool operator==( const Error_position& lhs ) const;
7239 unsigned int line_;
7240 unsigned int column_;
7241 std::string reason_;
7242 };
7243
7244 inline Error_position::Error_position()
7245 : line_( 0 )
7246 , column_( 0 )
7247 {
7248 }
7249
7250 inline Error_position::Error_position( unsigned int line, unsigned int column, const std::string& reason )
7251 : line_( line )
7252 , column_( column )
7253 , reason_( reason )
7254 {
7255 }
7256
7257 inline bool Error_position::operator==( const Error_position& lhs ) const
7258 {
7259 if( this == &lhs ) return true;
7260
7261 return ( reason_ == lhs.reason_ ) &&
7262 ( line_ == lhs.line_ ) &&
7263 ( column_ == lhs.column_ );
7264 }
7265 }
7266
7267 #endif