#include <coherence/io/pof/annotation/Portable.hpp>
Inherits Object, and Annotation.
This annotation is only permitted at class level and is a marker annotation with no members. The following class illustrates how to use Portable and PortableProperty annotations.
class Person : public class_spec<Person> { friend class factory<Person>; public: String::View getFirstName() const { return m_vsFirstName; } void setFirstName(String::View vsFirstName) { m_vsFirstName = vsFirstName; } String::View getLastName() const { return m_vsLastName; } void setLastName(String::View vsLastName) { m_vsLastName = vsLastName; } private: MemberView<String> m_vsFirstName; MemberView<String> m_vsLastName; }; COH_REGISTER_CLASS(TypedClass<Person>::create() ->annotate(Portable::create(1001)) ->declare(COH_PROPERTY(Person, FirstName, String::View)->annotate(PortableProperty::create(0))) ->declare(COH_PROPERTY(Person, LastName, String::View)->annotate(PortableProperty::create(1))));
Public Types | |
typedef spec::Handle | Handle |
Portable Handle definition. | |
typedef spec::View | View |
Portable View definition. | |
typedef spec::Holder | Holder |
Portable Holder definition. | |
Public Member Functions | |
virtual Class::View | annotationType () const |
Return the annotation type of this annotation. | |
Static Public Member Functions | |
static Class::View | getStaticClass () |
A convenience static method to return a reference to the Class definition for this Portable annotation class. |
static Class::View getStaticClass | ( | ) | [static] |
A convenience static method to return a reference to the Class definition for this Portable annotation class.