Beispiel #1
0
void destroyDomains(simflat_t *s) {
    /* release memory for particles */
    freeMe(s,dcenter);
    freeMe(s,natoms);
    freeMe(s,id);
    freeMe(s,iType);
    freeMe(s,mass);
    freeMe(s,r);
    freeMe(s,p);
    freeMe(s,f);
    freeMe(s,fi);
    freeMe(s,rho);
    s->stateflag = SIM_NOSTATE;
    return;
}
Beispiel #2
0
int wxChoice::GetSelection() const
{
    XmString text;
    Widget label = XmOptionButtonGadget ((Widget) m_buttonWidget);
    XtVaGetValues (label,
        XmNlabelString, &text,
        NULL);
    wxXmString freeMe(text);
    wxString s = wxXmStringToString( text );

    if (!s.empty())
    {
        int i = 0;
        for (wxStringList::compatibility_iterator node = m_stringList.GetFirst ();
             node; node = node->GetNext ())
        {
            if (wxStrcmp(node->GetData(), s.c_str()) == 0)
            {
                return i;
            }
            else
                i++;
        }            // for()

        return -1;
    }
    return -1;
}
Beispiel #3
0
void destroyAtoms(Atoms *atoms)
{
   freeMe(atoms,gid);
   freeMe(atoms,iSpecies);
   freeMe(atoms,r);
   freeMe(atoms,p);
   freeMe(atoms,f);
   freeMe(atoms,U);
   comdFree(atoms);
}
Beispiel #4
0
int wxChoice::GetSelection() const
{
    XmString text;
    Widget label = XmOptionButtonGadget ((Widget) m_buttonWidget);
    XtVaGetValues (label,
        XmNlabelString, &text,
        NULL);
    wxXmString freeMe(text);
    wxString s = wxXmStringToString( text );

    if (!s.empty())
    {
        for (size_t i=0; i<m_stringArray.GetCount(); i++)
            if (m_stringArray[i] == s)
                return i;

        return wxNOT_FOUND;
    }

    return wxNOT_FOUND;
}
void StructuringInfoWrapper::reset()
{
    freeMe();
    initMe();
}
StructuringInfoWrapper::~StructuringInfoWrapper()
{
    freeMe();
}