Skip to content

Commit

Permalink
refs #107
Browse files Browse the repository at this point in the history
  • Loading branch information
Herbert Koelman committed Dec 2, 2016
1 parent c644027 commit 2691d2a
Show file tree
Hide file tree
Showing 10 changed files with 602 additions and 418 deletions.
4 changes: 3 additions & 1 deletion include/atmi/atmi++.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
#include <atmi/exceptions.hpp>

#include <atmi/buffer.hpp>
#include <atmi/fields.hpp>
#include <atmi/field.hpp>
#include <atmi/template_field.hpp>
#include <atmi/call_info.hpp>
#include <atmi/carray_field.hpp>
#include <atmi/string_field.hpp>

#include <atmi/tuxedo.hpp>
#include <atmi/transaction.hpp>
Expand Down
4 changes: 2 additions & 2 deletions include/atmi/call_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <tpadm.h>

#include <atmi/definitions.hpp>
#include <atmi/fields.hpp>
#include <atmi/field.hpp>

#ifndef CPP_ATMI_CALL_INFO_HPP
#define CPP_ATMI_CALL_INFO_HPP
Expand Down Expand Up @@ -69,7 +69,7 @@ namespace atmi {
private:

buffer _buffer;
Tfield<std::string> _ecid;
Tfield<std::string,TA_ECID> _ecid;
};

/** @} */
Expand Down
23 changes: 12 additions & 11 deletions include/atmi/carray_field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <memory>
#include <stdexcept>
#include <atmi/definitions.hpp>
#include <atmi/fields.hpp>
#include <atmi/field.hpp>

#ifndef CPP_ATMI_CARRAY_FIELD_HPP
#define CPP_ATMI_CARRAY_FIELD_HPP
Expand All @@ -29,11 +29,17 @@ namespace atmi {
*
* This class is using a std::string object to hold and handle char * data
* \copydoc atmi::field
*
* @tparam T field's backend data type.
* @tparam fid field ID
*/
template <> class Tfield<char *>: public field {
template <FLDID32 fid> class Tfield<char *, fid>: public field {
public:

Tfield(): _length (0),_buffer_size(0), _value (NULL) {
/** create an instance of a specific FML field.
*
*/
Tfield(): _length (0),_buffer_size(0), _value (NULL), field(fid) {
// intentional
};

Expand Down Expand Up @@ -157,14 +163,9 @@ namespace atmi {
return _value[index];
}

/* if you need to change the field's value, get a copy by calling get_char_array.
*
* @return address of first character in carray (is NULL if no carray data is available)
*/
// operator const char * () const {
// return _value ;
// }

const std::string to_string() const {
return __FUNCTION__;
}

protected:

Expand Down
Loading

0 comments on commit 2691d2a

Please sign in to comment.