Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // EXPLAIN (wash): Retrieve a numeric utree as an integral/floating point
- // type. Symbol utrees will return either a Karma (in the future,
- // construe_cast) converted value, or throw conversion_error/assertion.
- // Container utrees will also throw/assert.
- template<class T>
- typename enable_if<is_integral<T>, boost::intmax_t>::type get (void) const;
- template<class T>
- typename enable_if<is_floating_point<T>, double>::type get (void) const;
- // EXPLAIN (wash): Retrieve a symbol utree as an string. If the utree is
- // a numeric, the value of the utree is converted to a string (using Karma;
- // in the future it should use construe_cast, once construe_cast is added to
- // Boost). If the utree is a sequence, conversion_error is thrown/assertion
- // will occur. Record utrees will exhibit user-defined behavior.
- template<class T>
- typename enable_if<is_same<T, std::string>, std::string>::type
- get (void) const;
- template<class T>
- typename enable_if<is_same<T, char const*>, char const*>::type
- get (void) const;
- // EXPLAIN (wash): Get a sequence utree as an arbitrary STL Container with
- // value_type utree. If the utree is not a sequence, return an instance of
- // said arbitrary STL Container with the current utree as it's only element.
- // This is only useful if you need repeated random access to a sequence utree
- // (aka enough random access that it's cheaper to copy the sequence to a
- // dynamic array first). This will be used for the utree to client AST
- // translation framework.
- template<class T>
- typename enable_if<is_class<T>, T>::type get (void) const;
Add Comment
Please, Sign In to add comment