Box< Owner, Data > Class Template Reference

#include <Box.h>

List of all members.

Public Member Functions

Data * open (void)
void close (Data **const t)
void skip (void)

Friends

class OwnerBox< Owner, Data >


Detailed Description

template<class Owner, class Data>
class Box< Owner, Data >

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 14 of file Box.h.


Member Function Documentation

template<class Owner, class Data>
void Box< Owner, Data >::close ( Data **const   t  )  [inline]

Definition at line 49 of file Box.h.

Referenced by ComputeNonbondedSelf::doForce(), ComputeNonbondedPair::doForce(), ComputePme::doWork(), ComputePatchPair::doWork(), ComputePatch::doWork(), ComputeLCPO::doWork(), ComputeHomePatch::doWork(), and ComputeNonbondedCUDA::finishPatch().

00049                                 {
00050       *t = NULL;
00051       ownerBox->closeCount--;
00052 #ifdef BOX_DEBUG
00053       if (ownerBox->closeCount < 0) NAMD_bug("too many boxes closed");
00054       if (state != OPEN) NAMD_bug("box re-closed");
00055       state = CLOSED;
00056 #endif
00057       // Trigger callback!
00058       if ( ! ownerBox->closeCount ) {
00059         ownerBox->close();
00060       }
00061     }

template<class Owner, class Data>
Data* Box< Owner, Data >::open ( void   )  [inline]

Definition at line 39 of file Box.h.

Referenced by ComputeNonbondedSelf::doForce(), ComputeNonbondedPair::doForce(), ComputePme::doWork(), ComputePatchPair::doWork(), ComputePatch::doWork(), ComputeLCPO::doWork(), ComputeHomePatch::doWork(), ComputeNonbondedCUDA::finishPatch(), and ComputeNonbondedCUDA::finishWork().

00039                      {
00040       ownerBox->openCount--;
00041 #ifdef BOX_DEBUG
00042       if (ownerBox->openCount < 0) NAMD_bug("too many boxes opened");
00043       if (state != CLOSED) NAMD_bug("box re-opened");
00044       state = OPEN; 
00045 #endif
00046       return ownerBox->data; 
00047     }

template<class Owner, class Data>
void Box< Owner, Data >::skip ( void   )  [inline]

Definition at line 63 of file Box.h.

Referenced by ComputePme::noWork(), ComputeNonbondedSelf::noWork(), ComputeNonbondedPair::noWork(), and ComputeLCPO::noWork().

00063                     {
00064       ownerBox->openCount--;
00065       ownerBox->closeCount--;
00066 #ifdef BOX_DEBUG
00067       if (state != CLOSED) NAMD_bug("box skipped while open");
00068       if (ownerBox->openCount < 0) NAMD_bug("too many boxes opened");
00069       if (ownerBox->closeCount < 0) NAMD_bug("too many boxes closed");
00070 #endif
00071       if ( ! ownerBox->closeCount ) {
00072         ownerBox->close();
00073       }
00074     }


Friends And Related Function Documentation

template<class Owner, class Data>
friend class OwnerBox< Owner, Data > [friend]

Definition at line 16 of file Box.h.


The documentation for this class was generated from the following file:
Generated on Mon Sep 25 01:17:16 2017 for NAMD by  doxygen 1.4.7