Class xlifepp::GeoNode#
-
class GeoNode#
-
utility class to describe a hierarchical composite construction each node represent either a unary operation on a geometry/GeoNode or a binary operation on two geometries/GeoNodes op(g1) op(g1,g2) its main purpose is to describe as a tree some complex composite geometries involving several minus, plus, common operations the GeoNode will be attached to any geometry as a member data (not allocated for canonical geometries) GeoNode may be used in two way, either handling GeoNode(s) or Geometry(s) (terminal leaf) in a compact construction such as (g1+g2+g3)-g4 the representation will be: geonode(-, &geonode(+, &geonode(+&g1,&g2) ,&g3), &g4) (two additional GeoNodes) if g=g1+g2+g3 has been already constructed, the representation will be geonode(-, &g, &g4) (no additional GeoNode !) in other words as soon as a geometry pointer is available it is used instead of a new geo node all the tree may be unrolled using expand() function
Public Functions
-
GeoNode(const GeoNode &gn)#
-
copy constructor (no deep copy of geometry pointers, see updateGeo)
copy constructor, no deep copy of geometry pointers
-
~GeoNode()#
-
destructor, geometry pointeurs are not deleted
increment by one level_ of each node from current node level
-
string_t asString() const#
-
string representation of GeoNode
interpret node as a string for printing purpose
-
void expand()#
-
expand recursively geometry pointers having themselves GeoNode representations
recursive expansion of a GeoNode (substitute geometry pointers by its Geonode if exists)
-
GeoNode &operator=(const GeoNode &gn)#
-
assign operator (no deep copy of geometry pointers, see updateGeo)
assign operator, no deep copy of geometry pointers
-
void updateGeo(std::map<Geometry*, Geometry*> &newgeo)#
-
update Geometry pointers from a map of Geometry* moves
recursive update of geometry pointers using the map relating old to new geometry pointers be cautious as copy or assignment does not realize a deep copy of geometry pointers to maintain integrity, they have probably to be updated after a copy or an assign operation
-
GeoNode(const GeoNode &gn)#