Oracle Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.2)

E26041-01

Portable Class Reference

#include <coherence/io/pof/annotation/Portable.hpp>

Inherits Object, and Annotation.

List of all members.


Detailed Description

Portable marks a class as being eligible for use by a PofAnnotationSerializer.

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))));

Author:
hr 2011.06.29
Since:
3.7.1
See also:
PortableProperty

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.

Member Function Documentation

static Class::View getStaticClass (  )  [static]

A convenience static method to return a reference to the Class definition for this Portable annotation class.

Returns:
a Class representing the Portable definition


The documentation for this class was generated from the following file:
Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.