//#####################################################################
// Copyright 2003-2009, Eran Guendelman, Geoffrey Irving, Michael Lentine, Andrew Selle.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
// Class STRUCTURE_LIST
//#####################################################################
#ifndef __STRUCTURE_LIST__
#define __STRUCTURE_LIST__

#include <Core/Data_Structures/DYNAMIC_LIST.h>
#include <Core/Meshes/STRUCTURE.h>
#include <Core/Utilities/VIEWER_DIR.h>
#include <Core/Vectors/VECTOR.h>
namespace PhysBAM{

template<class TV,class ID>
class STRUCTURE_LIST:public DYNAMIC_LIST<STRUCTURE<TV>,ID>
{
    typedef typename TV::SCALAR T;
    typedef DYNAMIC_LIST<STRUCTURE<TV>,ID> BASE;
public:
    using BASE::Size;using BASE::Needs_Write;using BASE::Active_Element;using BASE::Read;using BASE::Write;
    using BASE::Element_Index;using BASE::Set_Active_Element;using BASE::Is_Active;
    mutable ARRAY<std::string> names;

    STRUCTURE_LIST()
        :BASE()
    {}

    void Read(const VIEWER_DIR& viewer_dir,const std::string& list_name);
    void Write(STREAM_TYPE stream_type,const VIEWER_DIR& viewer_dir, const std::string& list_name) const;
};
}
#endif
