/tutorial/cecil/creation_old/c_factory.e

http://github.com/tybor/Liberty · Specman e · 13 lines · 9 code · 2 blank · 2 comment · 0 complexity · 509ca96848bb38f3c2c31c59193a14c2 MD5 · raw file

  1. class C_FACTORY
  2. feature {ANY}
  3. string_make (c_string: NATIVE_ARRAY[CHARACTER]): STRING is
  4. -- Creates a new Eiffel STRING using `c_string' contents as
  5. -- a model (for the contents of the new STRING).
  6. require
  7. c_string.is_not_null
  8. do
  9. create Result.from_external_copy(c_string.to_external)
  10. end
  11. end -- class C_FACTORY