Back to index

salome-kernel  6.5.0
Public Member Functions
SALOMEDS_AttributeParameter Class Reference

#include <SALOMEDS_AttributeParameter.hxx>

Inheritance diagram for SALOMEDS_AttributeParameter:
Inheritance graph
[legend]
Collaboration diagram for SALOMEDS_AttributeParameter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SALOMEDS_AttributeParameter (SALOMEDSImpl_AttributeParameter *theAttr)
 Function : Constructor Purpose : Creates a new instance of SALOMEDS_AttributeParameter.
 SALOMEDS_AttributeParameter (SALOMEDS::AttributeParameter_ptr theAttr)
 Function : Constructor Purpose : Creates a new instance of SALOMEDS_AttributeParameter.
 ~SALOMEDS_AttributeParameter ()
 Function : Destructor Purpose : Destroys the instance of SALOMEDS_AttributeParameter.
virtual void SetInt (const std::string &theID, const int theValue)
 Function : SetInt Purpose : Associates a integer value with the ID.
virtual int GetInt (const std::string &theID)
 Function : GetInt Purpose : Returns a int value associated with the given ID.
virtual void SetReal (const std::string &theID, const double &theValue)
 Function : SetReal Purpose : Associates a double value with the ID.
virtual double GetReal (const std::string &theID)
 Function : GetReal Purpose : Returns a double value associated with the given ID.
virtual void SetString (const std::string &theID, const std::string &theValue)
 Function : SetString Purpose : Associates a string with the ID.
virtual std::string GetString (const std::string &theID)
 Function : GetString Purpose : Returns a string associated with the given ID.
virtual void SetBool (const std::string &theID, const bool &theValue)
 Function : SetBool Purpose : Associates a bool value with the ID.
virtual bool GetBool (const std::string &theID)
 Function : GetBool Purpose : Returns a bool value associated with the ID.
virtual void SetRealArray (const std::string &theID, const std::vector< double > &theArray)
 Function : SetRealArray Purpose : Associates an array of double values with the given ID.
virtual std::vector< double > GetRealArray (const std::string &theID)
 Function : GetRealArray Purpose : Returns an array of double values associated with the ID.
virtual void SetIntArray (const std::string &theID, const std::vector< int > &theArray)
 Function : SetIntArray Purpose : Associates an array of int values with the given ID.
virtual std::vector< int > GetIntArray (const std::string &theID)
 Function : GetIntArray Purpose : Returns an array of int values associated with the ID.
virtual void SetStrArray (const std::string &theID, const std::vector< std::string > &theArray)
 Function : SetStrArray Purpose : Associates an array of string values with the given ID.
virtual std::vector< std::string > GetStrArray (const std::string &theID)
 Function : GetStrArray Purpose : Returns an array of string values associated with the ID.
virtual bool IsSet (const std::string &theID, const int theType)
 Function : IsSet Purpose : Returns true if for the ID of given type was assigned
a value in the attribute.
virtual bool RemoveID (const std::string &theID, const int theType)
 Function : RemoveID Purpose : Removes a parameter with given ID.
virtual _PTR (AttributeParameter) GetFather()
virtual bool HasFather ()
 Function : HasFather Purpose : Returns True if the attribute has a father attribute.
virtual bool IsRoot ()
 Function : IsRoot Purpose : Returns True is the attribute is highest in an hierachy.
virtual void Clear ()
 Function : Clear Purpose : Clears the content of the attribute.
virtual std::vector< std::string > GetIDs (const int theType)
 Function : GetIDs Purpose : Returns an array of all ID's of the given type.
virtual _PTR (SObject) GetSObject()=0
virtual void CheckLocked ()=0
virtual std::string Type ()=0
virtual std::string GetClassType ()=0

Detailed Description

Definition at line 39 of file SALOMEDS_AttributeParameter.hxx.


Constructor & Destructor Documentation

SALOMEDS_AttributeParameter::SALOMEDS_AttributeParameter ( SALOMEDSImpl_AttributeParameter *  theAttr)

Function : Constructor Purpose : Creates a new instance of SALOMEDS_AttributeParameter.

Definition at line 38 of file SALOMEDS_AttributeParameter.cxx.

:SALOMEDS_GenericAttribute(theAttr)
{}
SALOMEDS_AttributeParameter::SALOMEDS_AttributeParameter ( SALOMEDS::AttributeParameter_ptr  theAttr)

Function : Constructor Purpose : Creates a new instance of SALOMEDS_AttributeParameter.

Definition at line 48 of file SALOMEDS_AttributeParameter.cxx.

:SALOMEDS_GenericAttribute(theAttr)
{}

Function : Destructor Purpose : Destroys the instance of SALOMEDS_AttributeParameter.

Definition at line 58 of file SALOMEDS_AttributeParameter.cxx.

{}

Member Function Documentation

virtual SALOMEDSClient_GenericAttribute::_PTR ( SObject  ) [pure virtual, inherited]

Implemented in Standard_EXPORT, and Standard_EXPORT.

Here is the caller graph for this function:

virtual SALOMEDS_AttributeParameter::_PTR ( AttributeParameter  ) [virtual]
virtual void SALOMEDSClient_GenericAttribute::CheckLocked ( ) [pure virtual, inherited]

Implemented in Standard_EXPORT, and Standard_EXPORT.

Function : Clear Purpose : Clears the content of the attribute.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 448 of file SALOMEDS_AttributeParameter.cxx.

{
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->Clear();
  }
  else 
    SALOMEDS::AttributeParameter::_narrow(_corba_impl)->Clear();
}

Here is the call graph for this function:

bool SALOMEDS_AttributeParameter::GetBool ( const std::string &  theID) [virtual]

Function : GetBool Purpose : Returns a bool value associated with the ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 193 of file SALOMEDS_AttributeParameter.cxx.

{
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetBool(theID);
  }
  else
    return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetBool(theID.c_str());
}

Here is the call graph for this function:

virtual std::string SALOMEDSClient_GenericAttribute::GetClassType ( ) [pure virtual, inherited]

Implemented in Standard_EXPORT, and Standard_EXPORT.

std::vector< std::string > SALOMEDS_AttributeParameter::GetIDs ( const int  theType) [virtual]

Function : GetIDs Purpose : Returns an array of all ID's of the given type.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 464 of file SALOMEDS_AttributeParameter.cxx.

{
  std::vector<std::string> v;
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    SALOMEDSImpl_AttributeParameter* AP_impl = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl);
    return AP_impl->GetIDs((Parameter_Types)theType);
  }
  else {
    SALOMEDS::AttributeParameter_var AP_impl = SALOMEDS::AttributeParameter::_narrow(_corba_impl);
    SALOMEDS::StringSeq_var CorbaSeq = AP_impl->GetIDs(theType);
    int length = CorbaSeq->length();
    if(length) {
      v.resize(length);
      for(int i = 0; i <length; i++) v[i] = std::string(CorbaSeq[i].in());
    }
  }

  return v;
}

Here is the call graph for this function:

int SALOMEDS_AttributeParameter::GetInt ( const std::string &  theID) [virtual]

Function : GetInt Purpose : Returns a int value associated with the given ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 85 of file SALOMEDS_AttributeParameter.cxx.

{
  int aValue;
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetInt(theID);
  }
  else
    aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetInt(theID.c_str());
  return aValue;
}

Here is the call graph for this function:

std::vector< int > SALOMEDS_AttributeParameter::GetIntArray ( const std::string &  theID) [virtual]

Function : GetIntArray Purpose : Returns an array of int values associated with the ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 283 of file SALOMEDS_AttributeParameter.cxx.

{
  std::vector<int> v;
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetIntArray(theID);
  }
  else {
    SALOMEDS::LongSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetIntArray(theID.c_str());    
    int length = aSeq->length();
    if(length) {
      v.resize(length);
      for(int i = 0; i < length; i++) v[i] = aSeq[i];
    }
  }
  return v;
}

Here is the call graph for this function:

double SALOMEDS_AttributeParameter::GetReal ( const std::string &  theID) [virtual]

Function : GetReal Purpose : Returns a double value associated with the given ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 121 of file SALOMEDS_AttributeParameter.cxx.

{
  double aValue;
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetReal(theID);
  }
  else
    aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetReal(theID.c_str());
  return aValue;
}

Here is the call graph for this function:

std::vector< double > SALOMEDS_AttributeParameter::GetRealArray ( const std::string &  theID) [virtual]

Function : GetRealArray Purpose : Returns an array of double values associated with the ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 234 of file SALOMEDS_AttributeParameter.cxx.

{
  std::vector<double> v;
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetRealArray(theID);
  }
  else {
    SALOMEDS::DoubleSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetRealArray(theID.c_str());    
    int length = aSeq->length();
    if(length) {
      v.resize(length);
      for(int i = 0; i < length; i++) v[i] = aSeq[i];
    }
  }
  return v;
}

Here is the call graph for this function:

std::vector< std::string > SALOMEDS_AttributeParameter::GetStrArray ( const std::string &  theID) [virtual]

Function : GetStrArray Purpose : Returns an array of string values associated with the ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 332 of file SALOMEDS_AttributeParameter.cxx.

{
  std::vector<std::string> v;
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetStrArray(theID);
  }
  else {
    SALOMEDS::StringSeq_var aSeq = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetStrArray(theID.c_str());    
    int length = aSeq->length();
    if(length) {
      v.resize(length);
      for(int i = 0; i < length; i++) v[i] = std::string(aSeq[i].in());
    }
  }
  return v;
}

Here is the call graph for this function:

std::string SALOMEDS_AttributeParameter::GetString ( const std::string &  theID) [virtual]

Function : GetString Purpose : Returns a string associated with the given ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 157 of file SALOMEDS_AttributeParameter.cxx.

{
  std::string aValue;
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    aValue = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->GetString(theID);
  }
  else
    aValue = SALOMEDS::AttributeParameter::_narrow(_corba_impl)->GetString(theID.c_str());
  return aValue;
}

Here is the call graph for this function:

Function : HasFather Purpose : Returns True if the attribute has a father attribute.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 416 of file SALOMEDS_AttributeParameter.cxx.

{
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->HasFather();
  }
  else 
    return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->HasFather();
}

Here is the call graph for this function:

Function : IsRoot Purpose : Returns True is the attribute is highest in an hierachy.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 432 of file SALOMEDS_AttributeParameter.cxx.

{
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->IsRoot();
  }
  else 
    return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->IsRoot();
}

Here is the call graph for this function:

bool SALOMEDS_AttributeParameter::IsSet ( const std::string &  theID,
const int  theType 
) [virtual]

Function : IsSet Purpose : Returns true if for the ID of given type was assigned
a value in the attribute.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 358 of file SALOMEDS_AttributeParameter.cxx.

{
  if(_isLocal) {
    SALOMEDS::Locker lock; 
    return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->IsSet(theID, (Parameter_Types)theType);
  }
  else 
    return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->IsSet(theID.c_str(), theType);
}

Here is the call graph for this function:

bool SALOMEDS_AttributeParameter::RemoveID ( const std::string &  theID,
const int  theType 
) [virtual]

Function : RemoveID Purpose : Removes a parameter with given ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 374 of file SALOMEDS_AttributeParameter.cxx.

{
  CheckLocked();

  if(_isLocal) {
    SALOMEDS::Locker lock; 
    return dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->RemoveID(theID, (Parameter_Types)theType);
  }
  else
    return SALOMEDS::AttributeParameter::_narrow(_corba_impl)->RemoveID(theID.c_str(), theType);
}

Here is the call graph for this function:

void SALOMEDS_AttributeParameter::SetBool ( const std::string &  theID,
const bool theValue 
) [virtual]

Function : SetBool Purpose : Associates a bool value with the ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 175 of file SALOMEDS_AttributeParameter.cxx.

{
  CheckLocked();

  if(_isLocal) {
    SALOMEDS::Locker lock; 
    dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetBool(theID, theValue);
  }
  else
    SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetBool(theID.c_str(), theValue);
}

Here is the call graph for this function:

void SALOMEDS_AttributeParameter::SetInt ( const std::string &  theID,
const int  theValue 
) [virtual]

Function : SetInt Purpose : Associates a integer value with the ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 67 of file SALOMEDS_AttributeParameter.cxx.

{
  CheckLocked();

  if(_isLocal) {
    SALOMEDS::Locker lock; 
    dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetInt(theID, theValue);
  }
  else
    SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetInt(theID.c_str(), theValue);
}

Here is the call graph for this function:

void SALOMEDS_AttributeParameter::SetIntArray ( const std::string &  theID,
const std::vector< int > &  theArray 
) [virtual]

Function : SetIntArray Purpose : Associates an array of int values with the given ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 258 of file SALOMEDS_AttributeParameter.cxx.

{
  CheckLocked();

  if(_isLocal) {
    SALOMEDS::Locker lock; 
    dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetIntArray(theID, theArray);
  }
  else {
    SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq;
    int length = theArray.size();
    if(length) {
      aSeq->length(length);
      for(int i = 0; i<length; i++) aSeq[i] = theArray[i];
    }
    SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetIntArray(theID.c_str(), aSeq);
  }
}

Here is the call graph for this function:

void SALOMEDS_AttributeParameter::SetReal ( const std::string &  theID,
const double &  theValue 
) [virtual]

Function : SetReal Purpose : Associates a double value with the ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 103 of file SALOMEDS_AttributeParameter.cxx.

{
  CheckLocked();

  if(_isLocal) {
    SALOMEDS::Locker lock; 
    dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetReal(theID, theValue);
  }
  else
    SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetReal(theID.c_str(), theValue);
}

Here is the call graph for this function:

void SALOMEDS_AttributeParameter::SetRealArray ( const std::string &  theID,
const std::vector< double > &  theArray 
) [virtual]

Function : SetRealArray Purpose : Associates an array of double values with the given ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 209 of file SALOMEDS_AttributeParameter.cxx.

{
  CheckLocked();

  if(_isLocal) {
    SALOMEDS::Locker lock; 
    dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetRealArray(theID, theArray);
  }
  else {
    SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq;
    int length = theArray.size();
    if(length) {
      aSeq->length(length);
      for(int i = 0; i<length; i++) aSeq[i] = theArray[i];
    }
    SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetRealArray(theID.c_str(), aSeq);
  }
}

Here is the call graph for this function:

void SALOMEDS_AttributeParameter::SetStrArray ( const std::string &  theID,
const std::vector< std::string > &  theArray 
) [virtual]

Function : SetStrArray Purpose : Associates an array of string values with the given ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 307 of file SALOMEDS_AttributeParameter.cxx.

{
  CheckLocked();

  if(_isLocal) {
    SALOMEDS::Locker lock; 
    dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetStrArray(theID, theArray);
  }
  else {
    SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq;
    int length = theArray.size();
    if(length) {
      aSeq->length(length);
      for(int i = 0; i<length; i++) aSeq[i] = CORBA::string_dup(theArray[i].c_str());
    }
    SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetStrArray(theID.c_str(), aSeq);
  }
}

Here is the call graph for this function:

void SALOMEDS_AttributeParameter::SetString ( const std::string &  theID,
const std::string &  theValue 
) [virtual]

Function : SetString Purpose : Associates a string with the ID.

Implements SALOMEDSClient_AttributeParameter.

Definition at line 139 of file SALOMEDS_AttributeParameter.cxx.

{
  CheckLocked();

  if(_isLocal) {
    SALOMEDS::Locker lock; 
    dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_local_impl)->SetString(theID, theValue);
  }
  else
    SALOMEDS::AttributeParameter::_narrow(_corba_impl)->SetString(theID.c_str(), theValue.c_str());
}

Here is the call graph for this function:

virtual std::string SALOMEDSClient_GenericAttribute::Type ( ) [pure virtual, inherited]

Implemented in Standard_EXPORT, and Standard_EXPORT.


The documentation for this class was generated from the following files: