ConfigList::ConfigListNode Class Reference

#include <ConfigList.h>

List of all members.

Public Member Functions

 ConfigListNode (ConfigListNode *newnext, char *newname, StringList *newdata)
 ~ConfigListNode (void)

Public Attributes

char * name
StringListdata
ConfigListNodenext


Detailed Description

Definition at line 77 of file ConfigList.h.


Constructor & Destructor Documentation

ConfigList::ConfigListNode::ConfigListNode ( ConfigListNode newnext,
char *  newname,
StringList newdata 
) [inline]

Definition at line 84 of file ConfigList.h.

References data, NAMD_die(), name, and next.

00085                                                                {
00086         name = new char[strlen(newname)+1];  // create space for the name
00087         if ( name == NULL )
00088         {
00089           NAMD_die("new failed in ConfigListNode::ConfigListNode");
00090         }
00091         strcpy((char *) name, newname);      // and copy the new name
00092         data = newdata;
00093         next = newnext;
00094       }

ConfigList::ConfigListNode::~ConfigListNode ( void   )  [inline]

Definition at line 95 of file ConfigList.h.

References data, name, StringList::next, and next.

00096       {
00097         delete [] name;                  // delete the new'ed name
00098         name = NULL;
00099         next = NULL;
00100         StringList *curr=data, *next_local=NULL;  // go through the string list
00101 
00102         while ( curr!=NULL ) 
00103         {
00104           next_local = curr->next;           // and delete each element
00105           delete curr;
00106           curr = next_local;
00107         }
00108       }


Member Data Documentation

StringList* ConfigList::ConfigListNode::data

Definition at line 82 of file ConfigList.h.

Referenced by ConfigListNode(), and ~ConfigListNode().

char* ConfigList::ConfigListNode::name

Definition at line 81 of file ConfigList.h.

Referenced by ConfigListNode(), and ~ConfigListNode().

ConfigListNode* ConfigList::ConfigListNode::next

Definition at line 83 of file ConfigList.h.

Referenced by ConfigListNode(), and ~ConfigListNode().


The documentation for this class was generated from the following file:
Generated on Sat Sep 23 01:17:19 2017 for NAMD by  doxygen 1.4.7