Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
SketchRoot.ccGo to the documentation of this file.00001 //-*-c++-*- 00002 00003 #include "SketchRoot.h" 00004 #include "Sketch.h" 00005 00006 namespace DualCoding { 00007 00008 SketchSpace& SketchRoot::rootGetSpace() const { 00009 const Sketch<bool>& faker = *reinterpret_cast<const Sketch<bool>*>(this); 00010 return *(faker.data->space); 00011 } 00012 00013 const SketchDataRoot* SketchRoot::rootGetData() const { 00014 const Sketch<bool>* faker = reinterpret_cast<const Sketch<bool>*>(this); 00015 return reinterpret_cast<const SketchDataRoot*>(faker->data); 00016 } 00017 00018 int SketchRoot::idCounter = 0; 00019 00020 std::ostream& operator<<(std::ostream &os, const SketchRoot &r) { 00021 const SketchDataRoot* data = r.rootGetData(); 00022 if ( data != NULL ) 00023 os << "Sketch<" << SketchTypeNames[data->getType()] << ">(\"" 00024 << data->getName() << "\",id=" << data->getId() << ")"; 00025 else 00026 os << "Sketch()"; 00027 return os; 00028 } 00029 00030 } // namespace |
DualCoding 4.0 |
Generated Thu Nov 22 00:52:36 2007 by Doxygen 1.5.4 |