#include <Types.h>
Public Member Functions | |
LVolumeType (IPrinter &) | |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual std::string | name () const |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
virtual Lib::Variable | value (Lib::Identifier, const std::string &, void *) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!// | |
Private Attributes | |
std::string | fType |
Definition at line 11 of file Types.h.
LVolumeType::LVolumeType | ( | IPrinter & | ) |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 29 of file Types.cpp.
00032 :BaseType(aPrinter) 00033 ,fType("LVolume") 00036 { 00037 addProperty("id",Lib::Property::POINTER); 00038 addProperty("name",Lib::Property::STRING,70); 00039 addProperty("material",Lib::Property::STRING,70); 00040 addProperty("solid",Lib::Property::STRING,70); 00041 }
std::string LVolumeType::name | ( | ) | const [virtual] |
Lib::Variable LVolumeType::value | ( | Lib::Identifier | , | |
const std::string & | , | |||
void * | ||||
) | [virtual] |
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
Definition at line 50 of file Types.cpp.
00057 { 00058 const ILVolume* obj = (const ILVolume*)aIdentifier; 00059 if(aName=="id") { 00060 return Lib::Variable(printer(),(void*)obj); 00061 } else if(aName=="name") { 00062 return Lib::Variable(printer(),obj->name()); 00063 } else if(aName=="material") { 00064 const Material* material = obj->material(); 00065 return Lib::Variable(printer(),material ? material->name() : "(nil)"); 00066 } else if(aName=="solid") { 00067 const ISolid* solid = obj->solid(); 00068 if(solid) { 00069 #if defined(__GNUC__) && (__GNUC__ <= 2) 00070 std::ostrstream os; 00071 os << solid << std::ends; 00072 const std::string s(os.str()); 00073 return Lib::Variable(printer(),s); 00074 #else 00075 std::ostringstream os; 00076 os << solid << std::ends; 00077 return Lib::Variable(printer(),os.str()); 00078 #endif 00079 } else { 00080 const std::string s = "(nil)"; 00081 return Lib::Variable(printer(),s); 00082 } 00083 } else { 00084 return Lib::Variable(printer()); 00085 } 00086 }
std::string LVolumeType::fType [private] |