proj home

Files   Classes   Functions   Hierarchy  

vispoint3 Class Reference

#include <vispoint3.h>

Inheritance diagram for vispoint3:
Collaboration diagram for vispoint3:

List of all members.

Public Member Functions

void handlecommand (bool &matches, viscmd &c)
 Possibly run the command.
stringc id () const
 Command name.


Detailed Description

Definition at line 13 of file vispoint3.h.


Member Function Documentation

void vispoint3::handlecommand ( bool matches,
viscmd c 
) [virtual]

Possibly run the command.

Implements visoperator.

Definition at line 7 of file vispoint3.cpp.

References viscmd::arg, viscmd::command, vispointxml::piaddpoint(), tokenizer::reset(), tokenizer::seq, tokenizer::subtract(), viscmd::valid, visoperator::ve, and visoperator::vp.

00008 {
00009   assert(ve!=0);
00010   matches=false;
00011   if (c.command != this->id())
00012     return;
00013   matches=true;
00014 
00015   tokenizer ss;
00016   ss.seq.push_back(c.arg);
00017   ss.subtract(" ");
00018 
00019   uint sz=ss.seq.size();
00020   if ((sz%3)!=0)
00021   {
00022     c.valid=false; 
00023     return;
00024   }
00025 
00026   ss.reset();
00027   for ( ss.reset(); !ss; )
00028   {
00029     string a2 = ss() + " ";
00030     ++ss;
00031     a2 += ( ss() + " " );
00032     ++ss; 
00033     a2 += ss();
00034     ++ss;
00035 
00036     assert(vp);
00037     vp->piaddpoint(c.valid,a2);
00038     if (c.valid==false)
00039       return;
00040   }
00041 }

stringc vispoint3::id (  )  const [inline, virtual]

Command name.

Implements visoperator.

Definition at line 21 of file vispoint3.h.

00022     { return string("point3"); }


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:50:24 2011 for Chelton Evans Source by  doxygen 1.5.8