Changeset 218 for trunk/src


Ignore:
Timestamp:
Feb 25, 2006 8:39:36 PM (18 years ago)
Author:
cxsong
Message:

added xmlString. Changes in several functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mesh/element.h

    r211 r218  
    1212class RpElement {
    1313public:
    14         // constructors
    15         RpElement()
    16         {
    17                 // default
    18                 m_nodes.resize(10);
    19         };
    2014
    21         RpElement(int numNodes, int id)
    22         {
    23                 m_id = id;
    24                 if (m_nodes.capacity() < (unsigned)numNodes)
    25                         m_nodes.resize(numNodes);
    26         };
     15        // constructor, set number of nodes and/or element id
     16        RpElement(int numNodes, int id=0);
    2717
    2818        // instantiate from byte stream:
     
    4232        void id(int id) { m_id = id; };
    4333
     34        int numNodes() { return m_nodes.size(); };
    4435
    4536        // serialize
     
    4940        RP_ERROR deserialize(const char* buf);
    5041
     42        // serialize RpElement object into xml text
     43        void xmlString(std::string& xmlText);
    5144        void print();
    5245
     
    5649        // void xmlPut();
    5750        // void xmlGet();
     51
     52protected:
     53        // constructors, default to 8 nodes
     54        RpElement();
    5855
    5956private:
Note: See TracChangeset for help on using the changeset viewer.