00001 // <begin copyright notice> 00002 // --------------------------------------------------------------------------- 00003 // 00004 // Copyright (c) 1997 TargetJr Consortium 00005 // GE Corporate Research and Development (GE CRD) 00006 // 1 Research Circle 00007 // Niskayuna, NY 12309 00008 // All Rights Reserved 00009 // Reproduction rights limited as described below. 00010 // 00011 // Permission to use, copy, modify, distribute, and sell this software 00012 // and its documentation for any purpose is hereby granted without fee, 00013 // provided that (i) the above copyright notice and this permission 00014 // notice appear in all copies of the software and related documentation, 00015 // (ii) the name TargetJr Consortium (represented by GE CRD), may not be 00016 // used in any advertising or publicity relating to the software without 00017 // the specific, prior written permission of GE CRD, and (iii) any 00018 // modifications are clearly marked and summarized in a change history 00019 // log. 00020 // 00021 // THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, 00022 // EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 00023 // WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 00024 // IN NO EVENT SHALL THE TARGETJR CONSORTIUM BE LIABLE FOR ANY SPECIAL, 00025 // INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND OR ANY 00026 // DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 00027 // WHETHER OR NOT ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR ON 00028 // ANY THEORY OF LIABILITY ARISING OUT OF OR IN CONNECTION WITH THE 00029 // USE OR PERFORMANCE OF THIS SOFTWARE. 00030 // 00031 // --------------------------------------------------------------------------- 00032 // <end copyright notice> 00033 00034 //: 00035 // \file 00036 00037 #include "gevd_param_mixin.h" 00038 00039 //------------------------------------------------------------ 00040 //: Check if parameters are valid. The default does nothing. 00041 bool gevd_param_mixin::SanityCheck() { return true; } 00042 00043 //------------------------------------------------------------ 00044 //: Set the error message for this parameter block. 00045 // If the message is not empty, this sets the valid flag to be false. 00046 // An empty message resets the valid flag to be true. 00047 void gevd_param_mixin::SetErrorMsg(const char* msg) 00048 { 00049 if (msg && msg[0]) 00050 { 00051 error_msg_ = msg; 00052 valid_ = false; 00053 } 00054 else 00055 { 00056 error_msg_ = ""; 00057 valid_ = true; 00058 } 00059 }