Index: src/Box.cpp
===================================================================
--- src/Box.cpp	(revision dd067a91bd5ce81d3092ebda02eb4e1f20978a8f)
+++ src/Box.cpp	(revision d66cb7b6eecf9fdb226257ff28ed46a6eeec9270)
@@ -57,6 +57,4 @@
   M->setIdentity();
   Minv->setIdentity();
-  conditions.resize(3);
-  conditions[0] = conditions[1] = conditions[2] = Wrap;
 }
 
@@ -97,6 +95,4 @@
   ASSERT(M->determinant()!=0,"Matrix in Box construction was not invertible");
   *Minv = M->invert();
-  conditions.resize(3);
-  conditions[0] = conditions[1] = conditions[2] = Wrap;
 }
 
@@ -140,9 +136,9 @@
 
     switch(conditions[i]){
-    case Wrap:
+    case BoundaryConditions::Wrap:
       helper.at(i)=fmod(helper.at(i),1);
       helper.at(i)+=(helper.at(i)>=0)?0:1;
       break;
-    case Bounce:
+    case BoundaryConditions::Bounce:
       {
         // there probably is a better way to handle this...
@@ -153,5 +149,5 @@
       }
       break;
-    case Ignore:
+    case BoundaryConditions::Ignore:
       break;
     default:
@@ -171,5 +167,5 @@
   for(int i=0;i<NDIM;i++)
     result = result &&
-              ((conditions[i] == Ignore) ||
+              ((conditions[i] == BoundaryConditions::Ignore) ||
                ((tester[i] >= -MYEPSILON) &&
                ((tester[i] - 1.) < MYEPSILON)));
@@ -198,5 +194,5 @@
   index.clear();
   for(int i=0;i<NDIM;++i){
-    if(conditions[i]==Ignore){
+    if(conditions[i]==BoundaryConditions::Ignore){
       mask[i]=translater[i];
       continue;
@@ -220,8 +216,8 @@
     for(int i=0;i<dims;++i){
       switch(conditions[coords[i]]){
-        case Wrap:
+        case BoundaryConditions::Wrap:
           helper[coords[i]] = index[i]+translater[coords[i]];
           break;
-        case Bounce:
+        case BoundaryConditions::Bounce:
           {
             // Bouncing the coordinate x produces the series:
@@ -241,5 +237,5 @@
           }
           break;
-        case Ignore:
+        case BoundaryConditions::Ignore:
           ASSERT(0,"Ignored coordinate handled in generation loop");
           break;
@@ -308,14 +304,14 @@
 }
 
-const Box::Conditions_t Box::getConditions() const
-{
-  return conditions;
-}
-
-void Box::setCondition(int i,Box::BoundaryCondition_t condition)
+const BoundaryConditions::Conditions_t Box::getConditions() const
+{
+  return conditions.get();
+}
+
+void Box::setCondition(size_t i, const BoundaryConditions::BoundaryCondition_t condition)
 {
   OBSERVE;
   NOTIFY(BoundaryConditionsChanged);
-  conditions[i]=condition;
+  conditions.set(i, condition);
 }
 
Index: src/Box.hpp
===================================================================
--- src/Box.hpp	(revision dd067a91bd5ce81d3092ebda02eb4e1f20978a8f)
+++ src/Box.hpp	(revision d66cb7b6eecf9fdb226257ff28ed46a6eeec9270)
@@ -25,4 +25,6 @@
 #include "LinearAlgebra/VectorSet.hpp"
 
+#include "Box_BoundaryConditions.hpp"
+
 /**
  * A simple class that can be used to store periodic Boxes
@@ -41,12 +43,4 @@
     NotificationType_MAX  // denotes the maximum of available notification types
   };
-
-  typedef enum{
-    Wrap,
-    Bounce,
-    Ignore
-  } BoundaryCondition_t;
-
-  typedef std::vector<BoundaryCondition_t> Conditions_t;
 
   Box();
@@ -121,6 +115,7 @@
 
   Shape getShape() const;
-  const Conditions_t getConditions() const;
-  void setCondition(int,BoundaryCondition_t);
+
+  const BoundaryConditions::Conditions_t getConditions() const;
+  void setCondition(size_t i,const BoundaryConditions::BoundaryCondition_t condition);
 
   const std::vector<std::pair<Plane,Plane> > getBoundingPlanes() const;
@@ -149,5 +144,5 @@
   mutable std::vector<int> index;
 
-  Conditions_t conditions;
+  BoundaryConditions::BCContainer conditions;
   RealSpaceMatrix *M;    //!< Defines the layout of the box
   RealSpaceMatrix *Minv; //!< Inverse of M to avoid recomputation
Index: src/LinkedCell/LinkedCell_Model.cpp
===================================================================
--- src/LinkedCell/LinkedCell_Model.cpp	(revision dd067a91bd5ce81d3092ebda02eb4e1f20978a8f)
+++ src/LinkedCell/LinkedCell_Model.cpp	(revision d66cb7b6eecf9fdb226257ff28ed46a6eeec9270)
@@ -425,9 +425,9 @@
   for (size_t i=0;i<NDIM;++i) {
     switch (domain.getConditions()[i]) {
-    case Box::Wrap:
+    case BoundaryConditions::Wrap:
       if ((index[i] < 0) || (index[i] >= getSize(i)))
         index[i] = (index[i] % getSize(i));
       break;
-    case Box::Bounce:
+    case BoundaryConditions::Bounce:
       if (index[i] < 0)
         index[i] = 0;
@@ -435,5 +435,5 @@
         index[i] = getSize(i)-1;
       break;
-    case Box::Ignore:
+    case BoundaryConditions::Ignore:
       if (index[i] < 0)
         index[i] = 0;
@@ -470,5 +470,5 @@
         "LinkedCell_Model::getNeighborhoodBounds() - index "+toString(index)+" out of upper bounds.");
     switch (domain.getConditions()[i]) {
-      case Box::Wrap:
+      case BoundaryConditions::Wrap:
         if ((index[i] - step[i]) < 0)
           neighbors.first[i] = getSize(i) + (index[i] - step[i]);
@@ -479,5 +479,5 @@
         neighbors.second[i] = 2*step[i]+1;
         break;
-      case Box::Bounce:
+      case BoundaryConditions::Bounce:
         neighbors.second[i] = 2*step[i]+1;
         if (index[i] - step[i] >= 0) {
@@ -491,5 +491,5 @@
         }
         break;
-      case Box::Ignore:
+      case BoundaryConditions::Ignore:
         if (index[i] - step[i] < 0)
           neighbors.first[i] = 0;
Index: src/LinkedCell/unittests/Makefile.am
===================================================================
--- src/LinkedCell/unittests/Makefile.am	(revision dd067a91bd5ce81d3092ebda02eb4e1f20978a8f)
+++ src/LinkedCell/unittests/Makefile.am	(revision d66cb7b6eecf9fdb226257ff28ed46a6eeec9270)
@@ -58,5 +58,7 @@
 	../LinkedCell/unittests/stubs/TesselPointStub.cpp \
 	../LinkedCell/unittests/stubs/WorldStub.cpp \
-	../LinkedCell/PointCloudAdaptor.hpp
+	../LinkedCell/PointCloudAdaptor.hpp \
+	../Box_BoundaryConditions.cpp \
+	../Box_BoundaryConditions.hpp
 LinkedCell_ControllerUnitTest_LDADD = \
 	../libMolecuilderLinkedCell.la \
Index: src/LinkedCell/unittests/stubs/ObserverBoxStub.cpp
===================================================================
--- src/LinkedCell/unittests/stubs/ObserverBoxStub.cpp	(revision dd067a91bd5ce81d3092ebda02eb4e1f20978a8f)
+++ src/LinkedCell/unittests/stubs/ObserverBoxStub.cpp	(revision d66cb7b6eecf9fdb226257ff28ed46a6eeec9270)
@@ -38,7 +38,4 @@
   OurChannel->addChannel(Box::MatrixChanged);
   *Minv = M->invert();
-
-  conditions.resize(3);
-  conditions[0] = conditions[1] = conditions[2] = Wrap;
 }
 
@@ -59,7 +56,7 @@
 }
 
-const Box::Conditions_t Box::getConditions() const
+const BoundaryConditions::Conditions_t Box::getConditions() const
 {
-  return conditions;
+  return conditions.get();
 }
 
Index: src/unittests/BoxUnitTest.cpp
===================================================================
--- src/unittests/BoxUnitTest.cpp	(revision dd067a91bd5ce81d3092ebda02eb4e1f20978a8f)
+++ src/unittests/BoxUnitTest.cpp	(revision d66cb7b6eecf9fdb226257ff28ed46a6eeec9270)
@@ -896,13 +896,13 @@
   VECTORSET(std::vector) res;
 
-  unitBox->setCondition(0,Box::Bounce);
-  stretchedBox1->setCondition(0,Box::Bounce);
-  stretchedBox2->setCondition(0,Box::Bounce);
-  stretchedBox3->setCondition(0,Box::Bounce);
-  stretchedBox4->setCondition(0,Box::Bounce);
-  tiltedBox1->setCondition(0,Box::Bounce);
-  tiltedBox2->setCondition(0,Box::Bounce);
-  tiltedBox3->setCondition(0,Box::Bounce);
-  tiltedBox4->setCondition(0,Box::Bounce);
+  unitBox->setCondition(0,BoundaryConditions::Bounce);
+  stretchedBox1->setCondition(0,BoundaryConditions::Bounce);
+  stretchedBox2->setCondition(0,BoundaryConditions::Bounce);
+  stretchedBox3->setCondition(0,BoundaryConditions::Bounce);
+  stretchedBox4->setCondition(0,BoundaryConditions::Bounce);
+  tiltedBox1->setCondition(0,BoundaryConditions::Bounce);
+  tiltedBox2->setCondition(0,BoundaryConditions::Bounce);
+  tiltedBox3->setCondition(0,BoundaryConditions::Bounce);
+  tiltedBox4->setCondition(0,BoundaryConditions::Bounce);
 
   {
@@ -994,13 +994,13 @@
   }
 
-  unitBox->setCondition(1,Box::Bounce);
-  stretchedBox1->setCondition(1,Box::Bounce);
-  stretchedBox2->setCondition(1,Box::Bounce);
-  stretchedBox3->setCondition(1,Box::Bounce);
-  stretchedBox4->setCondition(1,Box::Bounce);
-  tiltedBox1->setCondition(1,Box::Bounce);
-  tiltedBox2->setCondition(1,Box::Bounce);
-  tiltedBox3->setCondition(1,Box::Bounce);
-  tiltedBox4->setCondition(1,Box::Bounce);
+  unitBox->setCondition(1,BoundaryConditions::Bounce);
+  stretchedBox1->setCondition(1,BoundaryConditions::Bounce);
+  stretchedBox2->setCondition(1,BoundaryConditions::Bounce);
+  stretchedBox3->setCondition(1,BoundaryConditions::Bounce);
+  stretchedBox4->setCondition(1,BoundaryConditions::Bounce);
+  tiltedBox1->setCondition(1,BoundaryConditions::Bounce);
+  tiltedBox2->setCondition(1,BoundaryConditions::Bounce);
+  tiltedBox3->setCondition(1,BoundaryConditions::Bounce);
+  tiltedBox4->setCondition(1,BoundaryConditions::Bounce);
 
   {
@@ -1092,13 +1092,13 @@
   }
 
-  unitBox->setCondition(2,Box::Bounce);
-  stretchedBox1->setCondition(2,Box::Bounce);
-  stretchedBox2->setCondition(2,Box::Bounce);
-  stretchedBox3->setCondition(2,Box::Bounce);
-  stretchedBox4->setCondition(2,Box::Bounce);
-  tiltedBox1->setCondition(2,Box::Bounce);
-  tiltedBox2->setCondition(2,Box::Bounce);
-  tiltedBox3->setCondition(2,Box::Bounce);
-  tiltedBox4->setCondition(2,Box::Bounce);
+  unitBox->setCondition(2,BoundaryConditions::Bounce);
+  stretchedBox1->setCondition(2,BoundaryConditions::Bounce);
+  stretchedBox2->setCondition(2,BoundaryConditions::Bounce);
+  stretchedBox3->setCondition(2,BoundaryConditions::Bounce);
+  stretchedBox4->setCondition(2,BoundaryConditions::Bounce);
+  tiltedBox1->setCondition(2,BoundaryConditions::Bounce);
+  tiltedBox2->setCondition(2,BoundaryConditions::Bounce);
+  tiltedBox3->setCondition(2,BoundaryConditions::Bounce);
+  tiltedBox4->setCondition(2,BoundaryConditions::Bounce);
 
   {
@@ -1195,13 +1195,13 @@
   VECTORSET(std::vector) res;
 
-  unitBox->setCondition(0,Box::Ignore);
-  stretchedBox1->setCondition(0,Box::Ignore);
-  stretchedBox2->setCondition(0,Box::Ignore);
-  stretchedBox3->setCondition(0,Box::Ignore);
-  stretchedBox4->setCondition(0,Box::Ignore);
-  tiltedBox1->setCondition(0,Box::Ignore);
-  tiltedBox2->setCondition(0,Box::Ignore);
-  tiltedBox3->setCondition(0,Box::Ignore);
-  tiltedBox4->setCondition(0,Box::Ignore);
+  unitBox->setCondition(0,BoundaryConditions::Ignore);
+  stretchedBox1->setCondition(0,BoundaryConditions::Ignore);
+  stretchedBox2->setCondition(0,BoundaryConditions::Ignore);
+  stretchedBox3->setCondition(0,BoundaryConditions::Ignore);
+  stretchedBox4->setCondition(0,BoundaryConditions::Ignore);
+  tiltedBox1->setCondition(0,BoundaryConditions::Ignore);
+  tiltedBox2->setCondition(0,BoundaryConditions::Ignore);
+  tiltedBox3->setCondition(0,BoundaryConditions::Ignore);
+  tiltedBox4->setCondition(0,BoundaryConditions::Ignore);
 
   {
@@ -1293,13 +1293,13 @@
   }
 
-  unitBox->setCondition(1,Box::Ignore);
-  stretchedBox1->setCondition(1,Box::Ignore);
-  stretchedBox2->setCondition(1,Box::Ignore);
-  stretchedBox3->setCondition(1,Box::Ignore);
-  stretchedBox4->setCondition(1,Box::Ignore);
-  tiltedBox1->setCondition(1,Box::Ignore);
-  tiltedBox2->setCondition(1,Box::Ignore);
-  tiltedBox3->setCondition(1,Box::Ignore);
-  tiltedBox4->setCondition(1,Box::Ignore);
+  unitBox->setCondition(1,BoundaryConditions::Ignore);
+  stretchedBox1->setCondition(1,BoundaryConditions::Ignore);
+  stretchedBox2->setCondition(1,BoundaryConditions::Ignore);
+  stretchedBox3->setCondition(1,BoundaryConditions::Ignore);
+  stretchedBox4->setCondition(1,BoundaryConditions::Ignore);
+  tiltedBox1->setCondition(1,BoundaryConditions::Ignore);
+  tiltedBox2->setCondition(1,BoundaryConditions::Ignore);
+  tiltedBox3->setCondition(1,BoundaryConditions::Ignore);
+  tiltedBox4->setCondition(1,BoundaryConditions::Ignore);
 
   {
@@ -1391,13 +1391,13 @@
   }
 
-  unitBox->setCondition(2,Box::Ignore);
-  stretchedBox1->setCondition(2,Box::Ignore);
-  stretchedBox2->setCondition(2,Box::Ignore);
-  stretchedBox3->setCondition(2,Box::Ignore);
-  stretchedBox4->setCondition(2,Box::Ignore);
-  tiltedBox1->setCondition(2,Box::Ignore);
-  tiltedBox2->setCondition(2,Box::Ignore);
-  tiltedBox3->setCondition(2,Box::Ignore);
-  tiltedBox4->setCondition(2,Box::Ignore);
+  unitBox->setCondition(2,BoundaryConditions::Ignore);
+  stretchedBox1->setCondition(2,BoundaryConditions::Ignore);
+  stretchedBox2->setCondition(2,BoundaryConditions::Ignore);
+  stretchedBox3->setCondition(2,BoundaryConditions::Ignore);
+  stretchedBox4->setCondition(2,BoundaryConditions::Ignore);
+  tiltedBox1->setCondition(2,BoundaryConditions::Ignore);
+  tiltedBox2->setCondition(2,BoundaryConditions::Ignore);
+  tiltedBox3->setCondition(2,BoundaryConditions::Ignore);
+  tiltedBox4->setCondition(2,BoundaryConditions::Ignore);
 
   {
@@ -1494,39 +1494,39 @@
   VECTORSET(std::vector) res;
 
-  unitBox->setCondition(0,Box::Bounce);
-  unitBox->setCondition(1,Box::Ignore);
-  unitBox->setCondition(2,Box::Wrap);
-
-  stretchedBox1->setCondition(0,Box::Bounce);
-  stretchedBox1->setCondition(1,Box::Ignore);
-  stretchedBox1->setCondition(2,Box::Wrap);
-
-  stretchedBox2->setCondition(0,Box::Bounce);
-  stretchedBox2->setCondition(1,Box::Ignore);
-  stretchedBox2->setCondition(2,Box::Wrap);
-
-  stretchedBox3->setCondition(0,Box::Bounce);
-  stretchedBox3->setCondition(1,Box::Ignore);
-  stretchedBox3->setCondition(2,Box::Wrap);
-
-  stretchedBox4->setCondition(0,Box::Bounce);
-  stretchedBox4->setCondition(1,Box::Ignore);
-  stretchedBox4->setCondition(2,Box::Wrap);
-
-  tiltedBox1->setCondition(0,Box::Bounce);
-  tiltedBox1->setCondition(1,Box::Ignore);
-  tiltedBox1->setCondition(2,Box::Wrap);
-
-  tiltedBox2->setCondition(0,Box::Bounce);
-  tiltedBox2->setCondition(1,Box::Ignore);
-  tiltedBox2->setCondition(2,Box::Wrap);
-
-  tiltedBox3->setCondition(0,Box::Bounce);
-  tiltedBox3->setCondition(1,Box::Ignore);
-  tiltedBox3->setCondition(2,Box::Wrap);
-
-  tiltedBox4->setCondition(0,Box::Bounce);
-  tiltedBox4->setCondition(1,Box::Ignore);
-  tiltedBox4->setCondition(2,Box::Wrap);
+  unitBox->setCondition(0,BoundaryConditions::Bounce);
+  unitBox->setCondition(1,BoundaryConditions::Ignore);
+  unitBox->setCondition(2,BoundaryConditions::Wrap);
+
+  stretchedBox1->setCondition(0,BoundaryConditions::Bounce);
+  stretchedBox1->setCondition(1,BoundaryConditions::Ignore);
+  stretchedBox1->setCondition(2,BoundaryConditions::Wrap);
+
+  stretchedBox2->setCondition(0,BoundaryConditions::Bounce);
+  stretchedBox2->setCondition(1,BoundaryConditions::Ignore);
+  stretchedBox2->setCondition(2,BoundaryConditions::Wrap);
+
+  stretchedBox3->setCondition(0,BoundaryConditions::Bounce);
+  stretchedBox3->setCondition(1,BoundaryConditions::Ignore);
+  stretchedBox3->setCondition(2,BoundaryConditions::Wrap);
+
+  stretchedBox4->setCondition(0,BoundaryConditions::Bounce);
+  stretchedBox4->setCondition(1,BoundaryConditions::Ignore);
+  stretchedBox4->setCondition(2,BoundaryConditions::Wrap);
+
+  tiltedBox1->setCondition(0,BoundaryConditions::Bounce);
+  tiltedBox1->setCondition(1,BoundaryConditions::Ignore);
+  tiltedBox1->setCondition(2,BoundaryConditions::Wrap);
+
+  tiltedBox2->setCondition(0,BoundaryConditions::Bounce);
+  tiltedBox2->setCondition(1,BoundaryConditions::Ignore);
+  tiltedBox2->setCondition(2,BoundaryConditions::Wrap);
+
+  tiltedBox3->setCondition(0,BoundaryConditions::Bounce);
+  tiltedBox3->setCondition(1,BoundaryConditions::Ignore);
+  tiltedBox3->setCondition(2,BoundaryConditions::Wrap);
+
+  tiltedBox4->setCondition(0,BoundaryConditions::Bounce);
+  tiltedBox4->setCondition(1,BoundaryConditions::Ignore);
+  tiltedBox4->setCondition(2,BoundaryConditions::Wrap);
 
   {
@@ -1646,5 +1646,5 @@
 
   // create update BoundaryConditionsChanged
-  unitBox->setCondition(0, Box::Wrap);
+  unitBox->setCondition(0, BoundaryConditions::Wrap);
   CPPUNIT_ASSERT_EQUAL((int)2, observer_general->updates);
   CPPUNIT_ASSERT_EQUAL(false, observer_matrix->wasNotified);
