gmx_ana_poscalc_t * PositionCalculationCollection::Impl::createCalculation(e_poscalc_t type, int flags) { gmx_ana_poscalc_t *pc; snew(pc, 1); pc->type = type; pc->itype = index_type_for_poscalc(type); gmx_ana_poscalc_set_flags(pc, flags); pc->refcount = 1; pc->coll = this; insertCalculation(pc, NULL); return pc; }
/*! * \param[out] pcp Position calculation data structure pointer to initialize. * \param[in,out] pcc Position calculation collection. * \param[in] type Type of calculation. * \param[in] flags Flags for setting calculation options * (see \ref poscalc_flags "documentation of the flags"). * \returns 0 on success. */ int gmx_ana_poscalc_create(gmx_ana_poscalc_t **pcp, gmx_ana_poscalc_coll_t *pcc, e_poscalc_t type, int flags) { gmx_ana_poscalc_t *pc; snew(pc, 1); pc->type = type; gmx_ana_poscalc_set_flags(pc, flags); pc->refcount = 1; pc->coll = pcc; insert_poscalc(pc, NULL); *pcp = pc; return 0; }