Wt::Enum< CHILD >::Var Class Reference

#include <enum.h>

Inheritance diagram for Wt::Enum< CHILD >::Var:

Inheritance graph
[legend]
Collaboration diagram for Wt::Enum< CHILD >::Var:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Var (int val=0)
Varoperator= (int val)
 operator int () const

Friends

class Enum< CHILD >::Var

Detailed Description

template<typename CHILD>
class Wt::Enum< CHILD >::Var

Definition at line 98 of file enum.h.


Constructor & Destructor Documentation

template<typename CHILD>
Wt::Enum< CHILD >::Var::Var ( int  val = 0  )  [inline]

Definition at line 100 of file enum.h.

00100                          : VarBase(val) {
00101             *this = val;
00102         }


Member Function Documentation

template<typename CHILD>
Wt::Enum< CHILD >::VarBase::operator int (  )  const [inline, inherited]

Definition at line 64 of file enum.h.

References Wt::Enum< CHILD >::defined, and Wt::Enum< CHILD >::VarBase::value.

00064                              {
00065             /// \bug GCC bug: requires a (void)
00066             (void) defined;
00067             return value;
00068         }

template<typename CHILD>
Var& Wt::Enum< CHILD >::Var::operator= ( int  val  )  [inline]

Definition at line 103 of file enum.h.

References Wt::Enum< CHILD >::defined, and Wt::Enum< CHILD >::VarBase::value.

00103                                 {
00104             bool value_is_valid_enum = std::binary_search(defined.begin(),
00105                                        defined.end(), val);
00106             if (value_is_valid_enum) {
00107                 VarBase::value = val;
00108             } else {
00109                 assert(value_is_valid_enum);
00110                 throw val;
00111             }
00112             return *this;
00113         }


Friends And Related Function Documentation

template<typename CHILD>
friend class Enum< CHILD >::Var [friend, inherited]

Definition at line 70 of file enum.h.


The documentation for this class was generated from the following file:

Generated Fri Jul 28 19:28:10 2006.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.