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 #include "stdafx.h" 00012 #include "ippdme/Response/ippGetPropResponse.h" 00013 #include "ippdme/misc/ippStringBuilder.h" 00014 00015 00016 /********************************************************************** 00017 00018 For this to work properly, each OnePropertyXXX propString function 00019 must reset k to point to where printing the next item should start. 00020 00021 */ 00022 00023 ippGetPropResponse::ippGetPropResponse( 00024 unsigned int inTagNumber, 00025 tagIdType inTagType 00026 ) 00027 : ippResponse(inTagNumber, inTagType, DataGetProp) 00028 { 00029 } 00030 00031 ippGetPropResponse::~ippGetPropResponse() 00032 { 00033 00034 } 00035 00036 void ippGetPropResponse::append(const ippOnePropertyPtr& inOneProp) 00037 { 00038 _oneProps.push_back(inOneProp.get()); 00039 } 00040 00041 ippOnePropertyPtr ippGetPropResponse::getOneProp(int n) const 00042 { 00043 return _oneProps[n]; 00044 } 00045 00046 int ippGetPropResponse::getNumberProps() const 00047 { 00048 return _oneProps.size(); 00049 } 00050 00051 std::string ippGetPropResponse::getResponseString() const 00052 { 00053 ippStringBuilder builder(_tag,"#"); 00054 for (size_t m = 0; m < _oneProps.size(); m++) { 00055 _oneProps[m]->propString(builder); 00056 } 00057 return builder.ToString(); 00058 00059 }