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

ippGoToCommand.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/ippGoToCommand.h"
00014 #include "ippdme/misc/ippStringBuilder.h"
00015 
00016 ippGoToCommand::ippGoToCommand(
00017   unsigned int tgNum,
00018         bool inHasX, bool inHasY, bool inHasZ,
00019         double  inX, double  inY, double  inZ,
00020         bool inHasToolA, bool inHasToolB, bool inHasToolC, 
00021         double  inToolA, double  inToolB, double  inToolC
00022 )
00023   : ippCommand(tgNum, CommandTag, GoTo)
00024 {
00025   _hasX = inHasX;
00026   _hasY = inHasY;
00027   _hasZ = inHasZ;
00028   _x = inX;
00029   _y = inY;
00030   _z = inZ;
00031   _hasToolA = inHasToolA;
00032   _hasToolB = inHasToolB;
00033   _hasToolC = inHasToolC;
00034   _toolA = inToolA;
00035   _toolB = inToolB;
00036   _toolC = inToolC;
00037 }
00038 
00039 std::string ippGoToCommand::getCommandString() const
00040 {
00041   ippStringBuilder builder(_tag);
00042   builder.StartFunc("GoTo");
00043 
00044   if (_hasX) {
00045     builder.AppendFunc("X",_x);
00046   }
00047   if (_hasY) {
00048     builder.AppendFunc("Y",_y);
00049   }
00050   if (_hasZ) {
00051     builder.AppendFunc("Z",_z);
00052   }
00053   if (_hasToolA) {
00054     builder.AppendFunc("Tool.A",_toolA);
00055   }
00056   if (_hasToolB) {
00057     builder.AppendFunc("Tool.B",_toolB);
00058   }
00059   if (_hasToolC) {
00060     builder.AppendFunc("Tool.C",_toolC);
00061   }
00062   builder.EndFunc();
00063   return builder.ToString();
00064 
00065 }
00066 

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