VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
noDataAdminContent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include "vrftasks/adminContent.h"
14 
15 
21 template <typename T_functor>
23 {
24 public:
27 
30  : DtAdminContent(orig)
31  { }
32 
35  DtNoDataAdminContent & orig)
36  {
37  if (this != &orig)
38  {
40  }
41  return *this;
42  }
43 
45  virtual ~DtNoDataAdminContent() { }
46 
49  {
51  }
52 
54  virtual bool init()
55  {
56  if (!DtAdminContent::init())
57  {
58  return false;
59  }
60  return true;
61  }
62 
64  virtual const DtAdminContentMessageType& type() const
65  {
66  return T_functor()();
67  }
68 
71  virtual DtAdminContent* clone() const
72  {
73  return new DtNoDataAdminContent<T_functor>(*this);
74  }
75 
79  virtual DtString stringRep() const
80  {
81  DtString str = "Admin Content type ";
82  str += type();
83  str += ". No text available.";
84  return str;
85  }
86 
88  virtual int netRepSize() const
89  {
91  return size;
92  }
93 
95  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize)
96  {
97  DtAdminContent::setFromNet(contentBuffer, contentSize);
98  contentBuffer += DtAdminContent::netRepSize();
99  return true;
100  }
101 
103  virtual bool setToNet()
104  {
106  return true;
107  }
108 };

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)