Points::Feature Class Reference

Base class of all Points feature classes in FreeCAD. More...

#include <PointsFeature.h>

Inheritance diagram for Points::Feature:
App::GeoFeature App::DocumentObject App::PropertyContainer Base::Persistence Base::BaseClass Points::Export Points::ImportAscii

List of all members.

Public Member Functions

 Feature (void)
 Constructor.
virtual Base::Type getTypeId (void) const
virtual ~Feature (void)

Static Public Member Functions

static void * create (void)
static Base::Type getClassTypeId (void)
static void init (void)

Public Attributes

PropertyPointKernel Points
 The point kernel property.

Protected Member Functions

virtual const App::PropertyDatagetPropertyData (void) const

Static Protected Member Functions

static const App::PropertyDatagetPropertyDataPtr (void)

methods overide Feature



virtual
App::DocumentObjectExecReturn
execute (void)
 recalculate the Feature
virtual const char * getViewProviderName (void) const
 returns the type name of the ViewProvider
void Restore (Base::XMLReader &reader)
 This method is used to restore properties from an XML document.
void RestoreDocFile (Base::Reader &reader)
 This method is used to restore large amounts of data from a file In this method you simply stream in your with SaveDocFile() saved data.
void onChanged (const App::Property *prop)
 get called by the container when a property was changed

Detailed Description

Base class of all Points feature classes in FreeCAD.

This class holds an PointsKernel object.

Definition at line 51 of file PointsFeature.h.


Constructor & Destructor Documentation

Feature::Feature ( void   ) 

Constructor.

Definition at line 48 of file PointsFeature.cpp.

References ADD_PROPERTY.

Feature::~Feature ( void   )  [virtual]

Definition at line 53 of file PointsFeature.cpp.


Member Function Documentation

void * Points::Feature::create ( void   )  [static]

Reimplemented from App::PropertyContainer.

Reimplemented in Points::ImportAscii, and Points::Export.

Definition at line 46 of file PointsFeature.cpp.

App::DocumentObjectExecReturn * Feature::execute ( void   )  [virtual]

recalculate the Feature

Reimplemented from App::DocumentObject.

Reimplemented in Points::ImportAscii, and Points::Export.

Definition at line 57 of file PointsFeature.cpp.

References App::DocumentObject::StdReturn.

Base::Type Points::Feature::getClassTypeId ( void   )  [static]
const App::PropertyData & Points::Feature::getPropertyData ( void   )  const [protected, virtual]

Reimplemented from App::PropertyContainer.

Reimplemented in Points::ImportAscii, and Points::Export.

Definition at line 46 of file PointsFeature.cpp.

const App::PropertyData * Points::Feature::getPropertyDataPtr ( void   )  [static, protected]

Reimplemented from App::PropertyContainer.

Reimplemented in Points::ImportAscii, and Points::Export.

Definition at line 46 of file PointsFeature.cpp.

Base::Type Points::Feature::getTypeId ( void   )  const [virtual]

Reimplemented from App::PropertyContainer.

Reimplemented in Points::ImportAscii, and Points::Export.

Definition at line 46 of file PointsFeature.cpp.

virtual const char* Points::Feature::getViewProviderName ( void   )  const [inline, virtual]

returns the type name of the ViewProvider

Reimplemented from App::DocumentObject.

Definition at line 67 of file PointsFeature.h.

void Points::Feature::init ( void   )  [static]

Reimplemented from App::PropertyContainer.

Reimplemented in Points::ImportAscii, and Points::Export.

Definition at line 46 of file PointsFeature.cpp.

Referenced by initPoints().

void Feature::onChanged ( const App::Property prop  )  [protected, virtual]
void Feature::Restore ( Base::XMLReader  )  [virtual]

This method is used to restore properties from an XML document.

It uses the XMLReader class, which bases on SAX, to read the in Save() written information. Again the Vector as an example:

 void PropertyVector::Restore(Base::XMLReader &reader)
 {
   // read my Element
   reader.readElement("PropertyVector");
   // get the value of my Attribute
   _cVec.x = (float)reader.getAttributeAsFloat("valueX");
   _cVec.y = (float)reader.getAttributeAsFloat("valueY");
   _cVec.z = (float)reader.getAttributeAsFloat("valueZ");
 }

Reimplemented from App::PropertyContainer.

Definition at line 62 of file PointsFeature.cpp.

void Feature::RestoreDocFile ( Base::Reader  )  [virtual]

This method is used to restore large amounts of data from a file In this method you simply stream in your with SaveDocFile() saved data.

Again you have to apply for the call of this method in the Restore() call:

 void PropertyMeshKernel::Restore(Base::XMLReader &reader)
 {
   reader.readElement("Mesh");
   std::string file (reader.getAttribute("file") );
 
   if(file == "")
   {
     // read XML
     MeshCore::MeshDocXML restorer(*_pcMesh);
     restorer.Restore(reader);
   }else{
     // initate a file read
     reader.addFile(file.c_str(),this);
  }
 }

After you issued the reader.addFile() your RestoreDocFile() is called:

 void PropertyMeshKernel::RestoreDocFile(Base::Reader &reader)
 {
     _pcMesh->Read( reader );
 }
See also:
Base::Reader,Base::XMLReader

Reimplemented from Base::Persistence.

Definition at line 67 of file PointsFeature.cpp.

References Points, and Points::PropertyPointKernel::RestoreDocFile().


Member Data Documentation


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

Generated on Wed Nov 23 19:02:41 2011 for FreeCAD by  doxygen 1.6.1