Source

enzo-dev-problem-types / src / enzo / FieldContainer.h

Full commit
/***********************************************************************
/
/  FIELD CONTAINER CLASS
/
/  written by: Matthew Turk, Devin Silvia
/  date:       January 2012
/
/  PURPOSE:
/
************************************************************************/
#ifndef __FIELD_CONTAINER__
#define __FIELD_CONTAINER__

class FieldContainer
{
    public:
        FieldContainer();
        FieldContainer(FieldContainer *orig);
        float &operator[](std::string);
        void AddField(std::string, int FieldNumber,
                       float value = FLOAT_UNDEFINED);
        void Clear();
        void SetupGrid(ProblemTypeGrid *thisgrid);
        void Apply(ProblemTypeGrid *thisgrid, int cellindex);
        int Needs(std::string field_name);
        std::map<std::string, float>::iterator start();
        std::map<std::string, float>::iterator end();
        void SetupDataLabels(EnzoProblemType *ptype);
    protected:
        std::map<std::string, float> field_values;
        std::map<std::string, field_type> field_numbers;
        std::vector<std::string> field_names;
};

#endif