You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by ve...@apache.org on 2012/08/02 17:36:21 UTC
svn commit: r1368544 - in /incubator/etch/trunk/binding-cpp/runtime:
include/serialization/EtchStructValue.h include/serialization/EtchType.h
src/main/serialization/EtchStructValue.cpp
src/main/serialization/EtchType.cpp
Author: veithm
Date: Thu Aug 2 15:36:21 2012
New Revision: 1368544
URL: http://svn.apache.org/viewvc?rev=1368544&view=rev
Log:
ETCH-184 Minor improvements in EtchStructValue and EtchType
Added const to some get methods
Change-Id: Id5bbf50ef722af4e54bf0ba38edc7214d9d9c3db
Modified:
incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h
incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h
incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp
incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp
Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h?rev=1368544&r1=1368543&r2=1368544&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchStructValue.h Thu Aug 2 15:36:21 2012
@@ -84,7 +84,7 @@ public:
* ETCH_EINVAL if the level of type is not LEVEL_NONE and the object is NULL
* ETCH_ERROR if the level of type is not LEVEL_NONE and the object is not validated and is not NULL
*/
- status_t put(EtchField &field, capu::SmartPointer<EtchObject> object, capu::SmartPointer<EtchObject> *value_old = NULL);
+ status_t put(const EtchField &field, capu::SmartPointer<EtchObject> object, capu::SmartPointer<EtchObject> *value_old = NULL);
/**
* Get value associated with key in the EtchStructValue.
@@ -109,7 +109,7 @@ public:
* ETCH_ERANGE if the pair with specified key does not exist in hash table
*
*/
- status_t remove(EtchField &key, capu::SmartPointer<EtchObject> *value_old);
+ status_t remove(const EtchField &key, capu::SmartPointer<EtchObject> *value_old);
/**
* Compares the type of this struct to another type.
Modified: incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h?rev=1368544&r1=1368543&r2=1368544&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/serialization/EtchType.h Thu Aug 2 15:36:21 2012
@@ -156,7 +156,7 @@ public:
* ETCH_EINVAL if value is null
* ETCH_ENOT_EXIST if there is no existing pair with specified key
*/
- status_t getValidator(EtchField &key, capu::SmartPointer<EtchValidator> &result);
+ status_t getValidator(const EtchField &key, capu::SmartPointer<EtchValidator> &result);
/**
* Adds the validator to the chain for this key.
Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp?rev=1368544&r1=1368543&r2=1368544&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchStructValue.cpp Thu Aug 2 15:36:21 2012
@@ -37,7 +37,7 @@ EtchStructValue::~EtchStructValue() {
}
-status_t EtchStructValue::put(EtchField &field, capu::SmartPointer<EtchObject> object, capu::SmartPointer<EtchObject> *old_value) {
+status_t EtchStructValue::put(const EtchField &field, capu::SmartPointer<EtchObject> object, capu::SmartPointer<EtchObject> *old_value) {
if (object.get() == NULL) {
capu::SmartPointer<EtchObject> tmp;
status_t result = remove(field, &tmp);
@@ -71,7 +71,7 @@ capu::bool_t EtchStructValue::isType(Etc
return mType->equals(otherType);
}
-status_t EtchStructValue::remove(EtchField &key, capu::SmartPointer<EtchObject> *value_old) {
+status_t EtchStructValue::remove(const EtchField &key, capu::SmartPointer<EtchObject> *value_old) {
return mTable.remove(key, value_old);
}
Modified: incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp?rev=1368544&r1=1368543&r2=1368544&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/main/serialization/EtchType.cpp Thu Aug 2 15:36:21 2012
@@ -136,7 +136,7 @@ status_t EtchType::putValidator(EtchFiel
}
}
-status_t EtchType::getValidator(EtchField& key, capu::SmartPointer<EtchValidator> &validator) {
+status_t EtchType::getValidator(const EtchField& key, capu::SmartPointer<EtchValidator> &validator) {
return mValidatorMap.get(key, &validator);
}