Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ippXYZResponse.cpp

Go to the documentation of this file.
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/ippXYZResponse.h"
00013 #include "ippdme/misc/ippStringBuilder.h"
00014 
00015 
00016 ippXYZResponse::ippXYZResponse(
00017   unsigned int inTagNumber, 
00018   tagIdType inTagType, 
00019   ippResponseNameType inResponseName
00020  )
00021  : ippResponse(inTagNumber, inTagType, inResponseName)
00022  , _hasR(false)
00023  , _hasToolA(false)
00024  , _hasToolB(false)
00025  , _hasToolC(false)
00026  , _hasX(false)
00027  , _hasY(false)
00028  , _hasZ(false)
00029 {
00030  
00031  }
00032 
00033  ippXYZResponse::ippXYZResponse(
00034          unsigned int inTagNumber, tagIdType inTagType,
00035          ippResponseNameType inResponseName, bool inHasR,
00036          bool inHasToolA, bool inHasToolB, bool inHasToolC,
00037          bool inHasX, bool inHasY, bool inHasZ,
00038          double inR, double inToolA, double inToolB, double inToolC,
00039          double inX, double inY, double inZ
00040 )
00041   : ippResponse(inTagNumber, inTagType, inResponseName)
00042  {
00043       _hasR = inHasR;
00044       _hasToolA = inHasToolA;
00045       _hasToolB = inHasToolB;
00046       _hasToolC = inHasToolC;
00047       _hasX = inHasX;
00048       _hasY = inHasY;
00049       _hasZ = inHasZ;
00050 
00051       _r = inR;
00052       _toolA = inToolA;
00053       _toolB = inToolB;
00054       _toolC = inToolC;
00055       _x = inX;
00056       _y = inY;
00057       _z = inZ;
00058 }
00059 
00060 
00061 void ippXYZResponse::getResponseStringEnd(
00062   ippStringBuilder& str
00063 ) const
00064 {
00065 
00066   if (_hasR) {
00067           str.AppendFunc("R", _r);
00068   }
00069   if (_hasX) {
00070           str.AppendFunc( "X", _x);
00071   }
00072   if (_hasY){
00073           str.AppendFunc( "Y", _y);
00074   }
00075   if (_hasZ) {
00076           str.AppendFunc( "Z", _z);
00077   }
00078   if (_hasToolA) {
00079           str.AppendFunc("Tool.A", _toolA);
00080   }
00081   if (_hasToolB) {
00082           str.AppendFunc("Tool.B", _toolB);
00083   }
00084   if (_hasToolC) {
00085           str.AppendFunc( "Tool.C", _toolC);
00086   }
00087 }

Generated on Wed Nov 8 00:20:06 2006 for IPPDME by  doxygen 1.4.1