///////////////////////////////////// // Declaration Management Services // ///////////////////////////////////// // 5.2 void RTI::RTIambassador::publishObjectClass( RTI::ObjectClassHandle theClass, const RTI::AttributeHandleSet& attributeList ) throw( RTI::ObjectClassNotDefined, RTI::AttributeNotDefined, RTI::OwnershipAcquisitionPending, RTI::FederateNotExecutionMember, RTI::ConcurrentAccessAttempted, RTI::SaveInProgress, RTI::RestoreInProgress, RTI::RTIinternalError ) { if( logger->isTraceEnabled() ) { char* theAttributeList = setToString( attributeList ); logger->trace( "[Starting] publishObjectClass(): classHandle=%d, attributes=%s", theClass, theAttributeList ); delete theAttributeList; } // get java versions of the parameters jintArray jAttSet = privateRefs->rti->convertAHS( attributeList ); // call the method privateRefs->env->CallVoidMethod( privateRefs->rti->jproxy, privateRefs->rti->PUBLISH_OBJECT_CLASS, theClass, jAttSet ); // clean up and run the exception check privateRefs->env->DeleteLocalRef( jAttSet ); privateRefs->rti->exceptionCheck(); logger->debug( "[Finished] publishObjectClass(): objectClass=%d", theClass ); }
// 5.6 void RTI::RTIambassador::subscribeObjectClassAttributes( RTI::ObjectClassHandle theClass, const RTI::AttributeHandleSet& attributes, RTI::Boolean active ) throw( RTI::ObjectClassNotDefined, RTI::AttributeNotDefined, RTI::FederateNotExecutionMember, RTI::ConcurrentAccessAttempted, RTI::SaveInProgress, RTI::RestoreInProgress, RTI::RTIinternalError ) { ///////////////////// // log the request // ///////////////////// if( logger->isTraceEnabled() ) { char* attributeList = setToString( attributes ); if( active == RTI:: RTI_TRUE ) { logger->trace( "[Starting] subscribeObjectClassAttributes(active): classHandle=%d, attributes=%s", theClass, attributeList ); } else { logger->trace( "[Starting] subscribeObjectClassAttributes(passive): classHandle=%d, attributes=%s", theClass, attributeList ); } delete attributeList; } ///////////////////////// // do the subscription // ///////////////////////// // get java versions of the parameters jintArray jAttSet = privateRefs->rti->convertAHS( attributes ); if( active == RTI::RTI_TRUE ) { // call the method privateRefs->env->CallVoidMethod( privateRefs->rti->jproxy, privateRefs->rti->SUBSCRIBE_OBJECT_CLASS_ATTRIBUTES_ACTIVELY, theClass, jAttSet ); } else { // call the method privateRefs->env->CallVoidMethod( privateRefs->rti->jproxy, privateRefs->rti->SUBSCRIBE_OBJECT_CLASS_ATTRIBUTES_PASSIVELY, theClass, jAttSet ); } // clean up and run the exception check privateRefs->env->DeleteLocalRef( jAttSet ); privateRefs->rti->exceptionCheck(); logger->debug( "[Finished] subscribeObjectClassAttributes(): classHandle=%d", theClass ); }
String MoveWithResult::toString() const { return format(_T("{%-5s}:%s"), setToString(*m_move).cstr(), statusToString(m_status).cstr()); }
std::string str() const { return setToString(m_elements, ","); }
/** * Color initialized using a single string. * \see Color::setToString for a list of valid strings. * @param colorName String description of what this color should end up * as. */ Color(const std::string& colorName) { setToString(colorName); };