//============================================================================
/*! Function : GetComponentNames
* Purpose : method to get all components names
+ * SRN: Note, theContext can be any, it doesn't matter
*/
//============================================================================
SALOMEDS::ListOfStrings* SALOMEDS_Study_i::GetComponentNames(const char* theContext)
SALOMEDS::ListOfStrings_var aResult = new SALOMEDS::ListOfStrings;
- if (strlen(theContext) == 0 && !_impl->HasCurrentContext())
- throw SALOMEDS::Study::StudyInvalidContext();
-
Handle(TColStd_HSequenceOfAsciiString) aSeq =
_impl->GetComponentNames(TCollection_AsciiString((char*)theContext));
return CORBA::string_dup(script.c_str());
}
+//============================================================================
+/*! Function : EnableUseCaseAutoFilling
+ * Purpose :
+ */
+//============================================================================
+void SALOMEDS_Study_i::EnableUseCaseAutoFilling(CORBA::Boolean isEnabled)
+{
+ _impl->EnableUseCaseAutoFilling(isEnabled);
+ Handle(SALOMEDSImpl_StudyBuilder) builder = _builder->GetImpl();
+ if(!builder.IsNull()) {
+ if(isEnabled) {
+ builder->SetOnAddSObject(_impl->GetCallback());
+ builder->SetOnRemoveSObject(_impl->GetCallback());
+ }
+ else {
+ builder->SetOnAddSObject(NULL);
+ builder->SetOnRemoveSObject(NULL);
+ }
+ }
+}
+
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================