- theNames->length(aLength);
- theMinutes->length(aLength);
- theHours->length(aLength);
- theDays->length(aLength);
- theMonths->length(aLength);
- theYears->length(aLength);
- int a;
- for(a = 0; a < aLength; a++)
- {
- (*theNames)[a] = CORBA::string_dup(TCollection_AsciiString(aNames->Value(a + 1 + ((theWithCreator)?0:1))).ToCString());
- (*theMinutes)[a] = aMinutes->Value(a + 1 + ((theWithCreator)?0:1));
- (*theHours)[a] = aHours->Value(a + 1 + ((theWithCreator)?0:1));
- (*theDays)[a] = aDays->Value(a + 1 + ((theWithCreator)?0:1));
- (*theMonths)[a] = aMonths->Value(a + 1 + ((theWithCreator)?0:1));
- (*theYears)[a] = aYears->Value(a + 1 + ((theWithCreator)?0:1));
- }
+ theNames->length(aRetLength);
+ theMinutes->length(aRetLength);
+ theHours->length(aRetLength);
+ theDays->length(aRetLength);
+ theMonths->length(aRetLength);
+ theYears->length(aRetLength);
+ int a = 0, ind = ((theWithCreator) ? 1 : 2);
+ for (; ind <= aLength; a++, ind++) {
+ (*theNames)[a] = CORBA::string_dup(aNames[ind-1].c_str());
+ (*theMinutes)[a] = aMinutes[ind-1];
+ (*theHours)[a] = aHours[ind-1];
+ (*theDays)[a] = aDays[ind-1];
+ (*theMonths)[a] = aMonths[ind-1];
+ (*theYears)[a] = aYears[ind-1];
+ }
+}
+
+void SALOMEDS_AttributeStudyProperties_i::SetComment(const char* theComment)
+{
+ SALOMEDS::Locker lock;
+ CheckLocked();
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->SetComment(std::string(theComment));
+}
+
+char* SALOMEDS_AttributeStudyProperties_i::GetComment()
+{
+ SALOMEDS::Locker lock;
+ std::string C = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetComment();
+ CORBA::String_var c_s = CORBA::string_dup(C.c_str());
+ return c_s._retn();
+}
+
+void SALOMEDS_AttributeStudyProperties_i::SetUnits(const char* theUnits)
+{
+ SALOMEDS::Locker lock;
+ CheckLocked();
+ dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->SetUnits(std::string(theUnits));
+}
+
+char* SALOMEDS_AttributeStudyProperties_i::GetUnits()
+{
+ SALOMEDS::Locker lock;
+ std::string U = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetUnits();
+ CORBA::String_var c_s = CORBA::string_dup(U.c_str());
+ return c_s._retn();
+}
+
+SALOMEDS::StringSeq* SALOMEDS_AttributeStudyProperties_i::GetStoredComponents()
+{
+ SALOMEDS::Locker lock;
+ std::vector<std::string> components = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetStoredComponents();
+ SALOMEDS::StringSeq_var c_components = new SALOMEDS::StringSeq();
+ c_components->length(components.size());
+ for (int i = 0; i < components.size(); i++) {
+ c_components[i] = CORBA::string_dup(components[i].c_str());
+ }
+ return c_components._retn();
+}
+
+char* SALOMEDS_AttributeStudyProperties_i::GetComponentVersion(const char* theComponent)
+{
+ SALOMEDS::Locker lock;
+ std::string version = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetComponentVersion(theComponent);
+ CORBA::String_var c_version = CORBA::string_dup(version.c_str());
+ return c_version._retn();
+}
+
+SALOMEDS::StringSeq* SALOMEDS_AttributeStudyProperties_i::GetComponentVersions(const char* theComponent)
+{
+ SALOMEDS::Locker lock;
+ std::vector<std::string> versions = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetComponentVersions(theComponent);
+ SALOMEDS::StringSeq_var c_versions = new SALOMEDS::StringSeq();
+ c_versions->length(versions.size());
+ for (int i = 0; i < versions.size(); i++) {
+ c_versions[i] = CORBA::string_dup(versions[i].c_str());
+ }
+ return c_versions._retn();