X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FSocketPolicy.hh;h=af32b65c15009f9a2e6738d410b505a9398f41a2;hb=3863d46dd898b7bc35ea8c6ccd8563b18762a6b6;hp=fbb298048a282998a56e6dabd0e58714b585603f;hpb=c778649a04a9835ecaad9108b9613832d76c2d15;p=senf.git diff --git a/Socket/SocketPolicy.hh b/Socket/SocketPolicy.hh index fbb2980..af32b65 100644 --- a/Socket/SocketPolicy.hh +++ b/Socket/SocketPolicy.hh @@ -1,8 +1,8 @@ // $Id:SocketPolicy.hh 218 2007-03-20 14:39:32Z tho $ // // Copyright (C) 2006 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -32,18 +32,17 @@ /** \defgroup policy_group The Policy Framework - \htmlonly - - SocketPolicy - WritePolicyBase - ReadPolicyBase - CommunicationPolicyBase - FramingPolicyBase - AddressingPolicyBase - - Socket Policy - \endhtmlonly - +
+ \ref WritePolicyBase + \ref AddressingPolicyBase + \ref FramingPolicyBase + \ref PolicyBase + \ref SocketPolicy + \ref CommunicationPolicyBase + \ref ReadPolicyBase +
+ \htmlonly SocketPolicy \endhtmlonly + \section policy_group_introduction Introduction to the Policy Framework The policy framework conceptually implements a list of parallel inheritance hierarchies each @@ -62,7 +61,7 @@
readPolicy
configures the readability of the socket
-
writePolicy
configures the writability of the socket
+
writePolicy
configures the writability of the socket
The template senf::SocketPolicy combines these policy axis to form a concrete socket policy. In a concrete policy, each of these policy axis is assigned a value, the policy value. This value @@ -71,7 +70,7 @@ from the axis base class FramingPolicyBase. This base class also doubles as UnspecifiedFramingPolicy (which is just a typedef alias). If a policy axis is assigned this Unspecified type, the axis is left unspecified, the concrete policy will be incomplete. - + The senf::SocketPolicy template defines the behavior of a socket handle. The socket handle instances do not implement any socket functionality themselves instead deferring the implementation to the policy classes. The SocketHandle interface is therefore \e not implemented @@ -130,7 +129,7 @@ meta-programming are needed. However, this information is only needed if you want to write new policy classes or want to use the policy framework explicitly for your own involved optimizations ... or if you are just plain curious :-) - + In the following discussion we will use the following conventions: \li \e Axis is one or \c AddressingPolicy, \c FramingPolicy, \c CommunicationPolicy, \c ReadPolicy or \c WritePolicy @@ -238,8 +237,8 @@ as base classes to build other policy classes. */ -#ifndef HH_SocketPolicy_ -#define HH_SocketPolicy_ 1 +#ifndef HH_SENF_Socket_SocketPolicy_ +#define HH_SENF_Socket_SocketPolicy_ 1 // Custom includes @@ -293,7 +292,7 @@ namespace senf { */ struct AddressingPolicyBase { - virtual ~AddressingPolicyBase() {} + virtual ~AddressingPolicyBase(); class Address { Address(); }; }; @@ -310,7 +309,7 @@ namespace senf { */ struct FramingPolicyBase { - virtual ~FramingPolicyBase() {} + virtual ~FramingPolicyBase(); }; /** \brief Policy defining, how peers are selected @@ -325,7 +324,7 @@ namespace senf { The \c listen member is straight forward. The \c accept() member must return a new file descriptor (which will be used to create a new SocketHandle of the correct - type). + type). \note This Policy only has two meaningful states: ConnectedCommunicationPolicy and UnconnectedCommunicationPolicy. It is probably not sensible to define a new @@ -335,7 +334,7 @@ namespace senf { */ struct CommunicationPolicyBase { - virtual ~CommunicationPolicyBase() {} + virtual ~CommunicationPolicyBase(); }; /** \brief Policy defining the readability @@ -358,7 +357,7 @@ namespace senf { */ struct ReadPolicyBase { - virtual ~ReadPolicyBase() {} + virtual ~ReadPolicyBase(); }; /** \brief Policy defining the writability @@ -381,7 +380,7 @@ namespace senf { */ struct WritePolicyBase { - virtual ~WritePolicyBase() {} + virtual ~WritePolicyBase(); }; // The implementation file will for each Policy declared above @@ -460,6 +459,8 @@ namespace senf { information. */ AddressingPolicyBase const & theAddressingPolicy() const = 0; + + virtual ~SocketPolicyBase(); }; /** \brief Collection of policy classes