CommandArc.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2002 Sony Corporation 
00003 //
00004 // Permission to use, copy, modify, and redistribute this software for
00005 // non-commercial use is hereby granted.
00006 //
00007 // This software is provided "as is" without warranty of any kind,
00008 // either expressed or implied, including but not limited to the
00009 // implied warranties of fitness for a particular purpose.
00010 //
00011 
00012 #ifndef CommandArc_h_DEFINED
00013 #define CommandArc_h_DEFINED
00014 
00015 #include <stdio.h>
00016 #include <MoNetData.h>
00017 #include "CommandNode.h"
00018 #include "MoNetCommandInfo.h"
00019 
00020 class CommandArc {
00021 public:
00022     CommandArc(const CommandNode& s,
00023                const CommandNode& d,
00024                MoNetCommandInfo* c) : src(s), dest(d), commandInfo(c) {}
00025     ~CommandArc() {}
00026 
00027     const CommandNode& Source() const      { return src;  }
00028     const CommandNode& Destination() const { return dest; }
00029     int Distance() const                   { return 1;    }
00030 
00031     void Print() const { 
00032         printf("(");
00033         src.Print();
00034         printf("->");
00035         dest.Print();
00036         printf(")");
00037     }
00038 
00039     MoNetCommandInfo* CommandInfo() { return commandInfo; }
00040 
00041 private:
00042     CommandNode       src;
00043     CommandNode       dest;
00044     MoNetCommandInfo* commandInfo;
00045 };
00046 
00047 #endif // CommandArc_h_DEFINED

Generated on Sun Dec 2 23:04:28 2007 for openSDK by  doxygen 1.3.9.1