/* This file is part of Lemma, a geophysical modelling and inversion API. * More information is available at http://lemmasoftware.org */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /** * @file * @date 05/31/2016 01:31:28 PM * @version $Id$ * @author Trevor Irons (ti) * @email tirons@egi.utah.edu * @copyright Copyright (c) 2016, University of Utah * @copyright Copyright (c) 2016, Lemma Software, LLC */ #ifndef DEMPARTICLE_INC #define DEMPARTICLE_INC #include "LemmaObject.h" namespace Lemma { /** \brief \details */ class DEMParticle : public LemmaObject { friend std::ostream &operator<<(std::ostream &stream, const DEMParticle &ob); public: // ==================== LIFECYCLE ======================= /** * Factory method for generating concrete class. * @return a std::shared_ptr of type DEMParticle */ static std::shared_ptr< DEMParticle > NewSP(); // ==================== OPERATORS ======================= // ==================== OPERATIONS ======================= // ==================== ACCESS ======================= void SetCentreMass( const Vector3r& pos ); Vector3r GetCentreMass( ); // ==================== INQUIRY ======================= #ifdef HAVE_YAMLCPP /** * Uses YAML to serialize this object. * @return a YAML::Node */ YAML::Node Serialize() const; /** * Constructs an object from a YAML::Node. */ static std::shared_ptr< DEMParticle > DeSerialize(const YAML::Node& node); #endif protected: // ==================== LIFECYCLE ======================= /** Default protected constructor, use New */ DEMParticle (const std::string& name); #ifdef HAVE_YAMLCPP /** Protected DeDerializing constructor, use factory DeSerialize method*/ DEMParticle (const YAML::Node& node); #endif /** Default protected destructor, use Delete */ ~DEMParticle (); private: // ==================== DATA MEMBERS ========================= Vector3r centreMass; }; // ----- end of class DEMParticle ----- } // ----- end of Lemma name ----- #endif // ----- #ifndef DEMPARTICLE_INC -----