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

ippPtMeasCommand.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 
00013 #include "ippdme/Command/ippPtMeasCommand.h"
00014 #include "ippdme/misc/ippStringBuilder.h"
00015 
00016 
00017 ippPtMeasCommand::ippPtMeasCommand(unsigned int tgNum)
00018 : ippCommand(tgNum, CommandTag, PtMeas)
00019 , _hasX(false)
00020 , _hasY(false)
00021 , _hasZ(false)
00022 , _hasIJK(false)
00023 , _x(0.0)
00024 , _y(0.0)
00025 , _z(0.0)
00026 {
00027 }
00028 
00029 ippPtMeasCommand::ippPtMeasCommand(
00030   unsigned int tgNum, bool inHasX, bool inHasY, bool inHasZ,
00031   bool inHasIJK, double inX, double inY, double inZ,
00032   double inI, double inJ, double inK
00033 )
00034  :  ippCommand(tgNum, CommandTag, PtMeas)
00035 {
00036   _hasX = inHasX;
00037   _hasY = inHasY;
00038   _hasZ = inHasZ;
00039   _hasIJK = inHasIJK;
00040   _x = inX;
00041   _y = inY;
00042   _z = inZ;
00043   _theIJK.setValues(inI, inJ, inK);
00044 }
00045 
00046 std::string ippPtMeasCommand::getCommandString() const
00047 {
00048   ippStringBuilder builder(_tag);
00049   builder.StartFunc("PtMeas");
00050 
00051   if (_hasX) {
00052     builder.AppendFunc("X",_x);
00053   }
00054   if (_hasY) {
00055     builder.AppendFunc("Y",_y);
00056   }
00057   if (_hasZ) {
00058     builder.AppendFunc("Z",_z);
00059   }
00060   if (_hasIJK && _theIJK.hasData())  {
00061     builder.AppendFunc("IJK",_theIJK);
00062   }
00063   builder.EndFunc();
00064   return builder.ToString();
00065 }
00066 

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