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 void SketchRoot::reset() { 00019 idCounter = 0; 00020 } 00021 00022 int SketchRoot::idCounter = 0; 00023 00024 std::ostream& operator<<(std::ostream &os, const SketchRoot &r) { 00025 const SketchDataRoot* data = r.rootGetData(); 00026 if ( data != NULL ) 00027 os << "Sketch<" << SketchTypeNames[data->getType()] << ">(\"" 00028 << data->getName() << "\",id=" << data->getId() << ")"; 00029 else 00030 os << "Sketch()"; 00031 return os; 00032 } 00033 00034 } // namespace |
DualCoding 5.1CVS |
Generated Mon May 9 04:56:28 2016 by Doxygen 1.6.3 |