00001 // 00002 // DISCLAIMER: 00003 // This software was produced by the National Institute of Standards 00004 // and Technology (NIST), an agency of the U.S. government, and by statute is 00005 // not subject to copyright in the United States. Recipients of this 00006 // software assume all responsibility associated with its operation, 00007 // modification,maintenance, and subsequent redistribution. 00008 // 00009 // See NIST Administration Manual 4.09.07 b and Appendix I. 00010 // 00011 00012 #include "stdafx.h" 00013 #include "ippdme/Response/ippSetPropEResponse.h" 00014 #include "ippdme/misc/ippStringBuilder.h" 00015 00016 ippSetPropEResponse::ippSetPropEResponse() 00017 : ippResponse(0, EventTag, DataSetPropE) 00018 { 00019 } 00020 00021 std::string ippSetPropEResponse::getResponseString() const 00022 { 00023 static ippTag tag(0,EventTag); 00024 ippStringBuilder s(tag,"#"); 00025 s.StartFunc("SetProp"); 00026 for (int m = 0; m < getNumberProps(); m++) { 00027 s.AppendFunc(getProp(m).toString().c_str(),getValue(m)); 00028 } 00029 s.EndFunc(); 00030 return s.ToString(); 00031 } 00032 00033 void ippSetPropEResponse::addPropValue(const ippProp& prop,double value) 00034 { 00035 _props.push_back(prop); 00036 _values.push_back(value); 00037 } 00038 int ippSetPropEResponse::getNumberProps() const 00039 { return _props.size(); } 00040 00041 double ippSetPropEResponse::getValue(int index) const 00042 { 00043 return _values[index]; 00044 }