bool CreateOrbitFromList (CCodeChain &CC, ICCItem *pList, COrbit *retOrbitDesc) // CreateOrbitFromList // // Creates an orbit from a list. { // Nil means default orbit if (pList == NULL || pList->IsNil()) { *retOrbitDesc = COrbit(); return true; } // Must be a list else if (!pList->IsList()) return false; // Load binary from list and check the class else { if (!CreateBinaryFromList(CC, CLASS_CORBIT, pList, retOrbitDesc)) return false; return true; } }
CVector CreateVectorFromList (CCodeChain &CC, ICCItem *pList) // CreateVectorFromList // // Creates a vector from a code chain list { CVector vVec; if (pList->IsList()) CreateBinaryFromList(CC, pList, &vVec); else if (pList->IsInteger()) { CSpaceObject *pObj = CreateObjFromItem(CC, pList); if (pObj) vVec = pObj->GetPos(); } return vVec; }