secureswitools/swisistools/source/sisxlibrary/checksum.h
changeset 26 04d4a7bbc3e0
parent 0 ba25891c3a9e
equal deleted inserted replaced
25:98b66e4fb0be 26:04d4a7bbc3e0
    69 	/**
    69 	/**
    70 	 * Adds the write the package details into the stream.
    70 	 * Adds the write the package details into the stream.
    71 	 * @param aStream - Stream in which the package entries need to be written.
    71 	 * @param aStream - Stream in which the package entries need to be written.
    72 	 * @param aVerbose - If this option is set then detail description of pkg
    72 	 * @param aVerbose - If this option is set then detail description of pkg
    73 	 * 			will be written into the stream.
    73 	 * 			will be written into the stream.
       
    74 	 * @param aCompatible - Flag to notify AddPackageEntry that Dumpsis works in the original,compatible mode
       
    75 	 * or in the new way.
    74 	 */
    76 	 */
    75 	void AddPackageEntry(std::wostream& aStream, bool aVerbose) const;
    77 	void AddPackageEntry(std::wostream& aStream, bool aVerbose, bool aCompatible) const;
       
    78 	/**
       
    79 	 * Adds the write the iby file details into the stream.
       
    80 	 * @param aStream - Stream in which the iby entry need to be written.
       
    81 	 * @param aVerbose - If this option is set then detail description of iby
       
    82 	 * 			will be written into the stream.
       
    83 	 * @param aCompatible - Flag to notify AddIbyEntry that Dumpsis works in the original,compatible mode
       
    84 	 * or in the new way.
       
    85 	 */
       
    86 	void AddIbyEntry(std::wostream& aStream, bool aVerbose, bool aCompatible) const;
    76 
    87 
    77 private:
    88 private:
    78 	CSISUInt16	iDataChecksum;
    89 	CSISUInt16	iDataChecksum;
    79 	};
    90 	};
    80 
    91 
   124 		}
   135 		}
   125 	}
   136 	}
   126 #endif // GENERATE_ERRORS
   137 #endif // GENERATE_ERRORS
   127 
   138 
   128 template <CSISFieldRoot::TFieldType FieldType> inline
   139 template <CSISFieldRoot::TFieldType FieldType> inline
   129 		void CChecksum <FieldType>::AddPackageEntry(std::wostream& aStream, bool aVerbose) const
   140 		void CChecksum <FieldType>::AddPackageEntry(std::wostream& aStream, bool aVerbose, bool aCompatible) const
       
   141 	{
       
   142 	if(aVerbose)
       
   143 		{
       
   144 		aStream << L"; CRC16: " << std::hex << iDataChecksum.Value() << std::dec << std::endl;
       
   145 		}
       
   146 	}
       
   147 
       
   148 template <CSISFieldRoot::TFieldType FieldType> inline
       
   149 		void CChecksum <FieldType>::AddIbyEntry(std::wostream& aStream, bool aVerbose, bool aCompatible) const
   130 	{
   150 	{
   131 	if(aVerbose)
   151 	if(aVerbose)
   132 		{
   152 		{
   133 		aStream << L"; CRC16: " << std::hex << iDataChecksum.Value() << std::dec << std::endl;
   153 		aStream << L"; CRC16: " << std::hex << iDataChecksum.Value() << std::dec << std::endl;
   134 		}
   154 		}