VR-Forces 4.0.4 Class Documentation
include/mtflt/mtFltNode.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2005 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: mtFltNode.h,v $ $Revision: 1.10 $ $State: Exp $
00007 *******************************************************************************/
00008 
00009 #ifndef mtFltNode_H_
00010 #define mtFltNode_H_
00011 
00012 //
00013 // \file mtFltNode.h
00014 // \brief Represents an XML node of the Metaflight file.
00015 //
00016 
00017 #include "mtflt/mtfltDefines.h"
00018 #include <vlutil/vlString.h>
00019 #include <libxml/xmlreader.h>
00020 
00021 // \brief Abstract class that represents an XML node of the Metaflight file.
00022 // An XML Metaflight node has a "name" attribute plus extra properties which 
00023 // can be nodes themselves.
00024 // \par
00025 // \code
00026 // <node name="aname"> 
00027 //   ... properties ... 
00028 // </node> 
00029 // \endcode
00030 class DT_DLL_mtflt DtMtFltNode
00031 {
00032 public:
00033    
00034    // Default constructor.
00035    DtMtFltNode();
00036    
00037    // Destructor
00038    virtual ~DtMtFltNode();
00039    
00040    // Copy constructor
00041    DtMtFltNode(const DtMtFltNode& node);
00042    
00043    // Assignment operator
00044    DtMtFltNode& operator=(const DtMtFltNode& orig);
00045 
00046    // Reads the information from the xml node into this object. xmlNodePtr 
00047    // is the type handed back by libXml which is the library being used to 
00048    // read xml documents.   
00049    // \param root pointer to the root node of the document
00050    // \param node pointer to the xml node that will be read
00051    // \return \b true if success reading the node. \b false otherwise.
00052    virtual bool readNode(const xmlNodePtr root, xmlNodePtr node) = 0;
00053    
00054    // Name of the node   
00055    virtual DtString name() const;
00056 
00057 protected:
00058 
00059    // This is the attribute stored in the name attribute of the xml node
00060    // <tt> <node <b>name="myname" </b>>...</node> </tt>
00061    DtString myName;
00062 
00063 };
00064 
00065 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)