00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TORC_GENERIC_OM_STATUS_HPP
00017 #define TORC_GENERIC_OM_STATUS_HPP
00018
00019 #include <vector>
00020
00021 #include "torc/generic/om/PointerTypes.hpp"
00022 #include "torc/generic/om/Commentable.hpp"
00023 #include "torc/generic/om/Visitable.hpp"
00024 #include "torc/generic/om/VisitorType.hpp"
00025 #include "torc/generic/om/UserDataContainer.hpp"
00026 #include "torc/generic/om/SelfReferencing.hpp"
00027 #include "torc/generic/util/Error.hpp"
00028 #include "torc/generic/om/FactoryType.hpp"
00029 #include "torc/generic/om/StatusContainer.hpp"
00030
00031 namespace torc { namespace generic { class Written; } }
00032 namespace torc { namespace generic { class BaseVisitor; } }
00033
00034 namespace torc {
00035
00036 namespace generic {
00037
00038
00039
00040
00041
00042
00043 class Status :
00044 public Commentable,
00045 public Visitable,
00046 public UserDataContainer,
00047 public SelfReferencing<Status> {
00048
00049 friend class FactoryType<Status>;
00050
00051 public:
00052
00053
00054
00055
00056 typedef VisitorType<Status> Visitor;
00057
00058
00059
00060
00061 class Factory: public FactoryType<Status>
00062 {
00063 public:
00064 using FactoryType<Status>::create;
00065
00066
00067
00068
00069
00070
00071
00072 StatusSharedPtr
00073 virtual newStatusPtr( const StatusContainerSharedPtr & inContainer ) throw(Error);
00074
00075 };
00076
00077 virtual
00078 ~Status() throw();
00079
00080
00081
00082
00083
00084
00085 inline void
00086 getWrittens( std::vector< WrittenSharedPtr > &outValues) const throw();
00087
00088
00089
00090
00091
00092
00093 void
00094 setWrittens( const std::vector< WrittenSharedPtr > &inSource ) throw();
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 void
00105 addWritten(WrittenSharedPtr & inWritten) throw(Error);
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 virtual void
00120 accept(BaseVisitor & visitor) throw(Error);
00121
00122 protected:
00123 Status();
00124
00125 private:
00126 std::vector< WrittenSharedPtr > mWrittens;
00127
00128 };
00129
00130 inline void
00131 Status::getWrittens(
00132 std::vector< WrittenSharedPtr > &outValues ) const throw() {
00133 outValues.insert( outValues.end(),
00134 mWrittens.begin(), mWrittens.end() );
00135 }
00136
00137 }
00138
00139 }
00140 #endif // TORC_GENERIC_OM_STATUS_HPP