GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloINumRecordAttribute.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOINUMRECORDATTRIBUTE_H
2#define INC_GLOINUMRECORDATTRIBUTE_H
3//-----------------------------------------------------------------------------
37//-----------------------------------------------------------------------------
38#include <sstream>
39#include "EuStdFunctions.h"
40#include "GloTypes.h"
42//-----------------------------------------------------------------------------
43namespace glo
44{
45 //---------------------------------------------------------------------------
59 {
60 protected:
61 //============= Konstruktoren
62 //-----------------------------------------------------------------------
73 //-----------------------------------------------------------------------
86 //-----------------------------------------------------------------------
87
88 public:
89 //============= Konstruktoren
90 //-----------------------------------------------------------------------
114 const std::streampos & rFilePos );
115 //-----------------------------------------------------------------------
116
117
118 protected:
119 //============== Konstruktoren
120 //-----------------------------------------------------------------------
134 //-----------------------------------------------------------------------
135
136 public:
137 //============== Methods
138 //-----------------------------------------------------------------------
156 template<typename T> std::string getTValueAsString( const T & rTValue, bool bFillBlanks ) const;
157 //-----------------------------------------------------------------------
158
159 //============== Operatoren
160 //-----------------------------------------------------------------------
162
173 bool operator== ( const INumRecordAttribute & rT ) const;
174 bool operator!= ( const INumRecordAttribute & rT ) const;
176 //-----------------------------------------------------------------------
177
178 private:
179 //============== Operatoren
180 //-----------------------------------------------------------------------
191 //-----------------------------------------------------------------------
192 };
193 //---------------------------------------------------------------------------
194 template<typename T> std::string INumRecordAttribute::getTValueAsString( const T & rTValue, bool bFillBlanks ) const
195 {
196 std::ostringstream t_ossTemp;
197 std::string t_strRetVal;
198
199 t_ossTemp << rTValue;
200 // Wenn Beschränkung und zu groß -> abschneiden
201 if ( t_ossTemp.str().length() > this->getDataFieldLength() )
202 {
203 t_strRetVal.clear();
204 t_strRetVal.append( t_ossTemp.str(),
205 std::size_t( 0 ),
206 std::size_t( this->getDataFieldLength() ) );
207 }
208 else
209 {
210 t_strRetVal = t_ossTemp.str();
211 if ( t_strRetVal.length() < this->getDataFieldLength() && bFillBlanks )
212 {
214 ' ',
215 this->getDataFieldLength(),
217 }
218 }
219 return t_strRetVal;
220 }
221 //---------------------------------------------------------------------------
222} // namespace glo
223#endif
Header für StdStringFunctions
Header für BaseRecordAttribute
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:63
Basisklasse für die einzelnen Attribute eines Record.
Definition GloBaseRecordAttribute.h:109
virtual unsigned short getDataFieldLength() const =0
In Objekten dieser Klasse sind die Information für GlobalObjects, wie ein persistentes Klassenattribu...
Definition GloClassInfoAttribute.h:76
Repräsentiert als Oberklasse alle Ganzzahl-Attribute eines Record.
Definition GloINumRecordAttribute.h:59
std::string getTValueAsString(const T &rTValue, bool bFillBlanks) const
Definition GloINumRecordAttribute.h:194
INumRecordAttribute(ClassInfoAttribute *pType, const std::streampos &rFilePos)
INumRecordAttribute(const INumRecordAttribute &rT)
__tool_export_dll void fillString(std::string &rstr, char cFillItem, std::size_t nNumber, EnStrPos ePos)
@ eBEFORE
Definition EuStdFunctions.h:139
Definition GloAbstractBaseLot.h:42