#include <CigiBaseSymbolCircleDef.h>
Inheritance diagram for CigiBaseSymbolCircleDef:
Public Types | |
Line = 0 | |
Fill = 1 | |
enum | DrawingStyleGrp { Line = 0, Fill = 1 } |
Public Member Functions | |
CigiBaseSymbolCircleDef (void) | |
virtual | ~CigiBaseSymbolCircleDef (void) |
CigiBaseSymbolCircleDef (const CigiBaseSymbolCircleDef &BaseIn) | |
CigiBaseSymbolCircleDef & | operator= (const CigiBaseSymbolCircleDef &BaseIn) |
virtual int | Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const =0 |
virtual int | Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec)=0 |
virtual int | GetTruePacketSize (CigiBaseVariableSizePckt &refPacket) |
virtual int | GetCnvt (CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo) |
int | SetSymbolID (const Cigi_uint16 SymbolIDIn, bool bndchk=true) |
Cigi_uint16 | GetSymbolID (void) const |
int | SetDrawingStyle (const DrawingStyleGrp DrawingStyleIn, bool bndchk=true) |
DrawingStyleGrp | GetDrawingStyle (void) const |
int | SetStipplePattern (const Cigi_uint16 StipplePatternIn, bool bndchk=true) |
Cigi_uint16 | GetStipplePattern (void) const |
int | SetLineWidth (const float LineWidthIn, bool bndchk=true) |
float | GetLineWidth (void) const |
int | SetStipplePatternLen (const float StipplePatternLenIn, bool bndchk=true) |
float | GetStipplePatternLen (void) const |
int | GetCircleCount (void) |
virtual CigiBaseCircleSymbolData * | AddCircle (void)=0 |
virtual int | RemoveCircle (int CircleIndex, bool bndchk=true)=0 |
CigiBaseCircleSymbolData * | GetCircle (int CircleIndex, bool bndchk=true) |
void | ClearCircles (void) |
Protected Attributes | |
Cigi_uint16 | SymbolID |
DrawingStyleGrp | DrawingStyle |
Cigi_uint16 | StipplePattern |
float | LineWidth |
float | StipplePatternLen |
std::vector< CigiBaseCircleSymbolData * > | Circles |
Friends | |
class | CigiSymbolCircleDefV3_3 |
Definition at line 62 of file CigiBaseSymbolCircleDef.h.
The enumeration for the CigiBaseSymbolCircleDef Datum type Group
Definition at line 75 of file CigiBaseSymbolCircleDef.h.
CigiBaseSymbolCircleDef::CigiBaseSymbolCircleDef | ( | void | ) |
CigiBaseSymbolCircleDef::~CigiBaseSymbolCircleDef | ( | void | ) | [virtual] |
General Destructor
Definition at line 62 of file CigiBaseSymbolCircleDef.cpp.
References Circles.
00063 { 00064 CigiBaseCircleSymbolData *pCircle; 00065 vector<CigiBaseCircleSymbolData *>::iterator iCircle; 00066 for(iCircle=Circles.begin();iCircle!=Circles.end();iCircle++) 00067 { 00068 pCircle = *iCircle; 00069 if(pCircle != NULL) 00070 delete pCircle; 00071 } 00072 Circles.clear(); 00073 }
CigiBaseSymbolCircleDef::CigiBaseSymbolCircleDef | ( | const CigiBaseSymbolCircleDef & | BaseIn | ) |
Copy Constructor
Definition at line 79 of file CigiBaseSymbolCircleDef.cpp.
References DrawingStyle, LineWidth, StipplePattern, StipplePatternLen, and SymbolID.
00080 { 00081 SymbolID = BaseIn.SymbolID; 00082 DrawingStyle = BaseIn.DrawingStyle; 00083 StipplePattern = BaseIn.StipplePattern; 00084 LineWidth = BaseIn.LineWidth; 00085 StipplePatternLen = BaseIn.StipplePatternLen; 00086 00087 // The Circle Vector should be copied in the specific version class 00088 }
virtual CigiBaseCircleSymbolData* CigiBaseSymbolCircleDef::AddCircle | ( | void | ) | [pure virtual] |
A pure virtual Create Circle function. This function is not implemented in this class. The implemented function will create a circle object and insert a pointer into the Circle Vector.
Implemented in CigiSymbolCircleDefV3_3.
void CigiBaseSymbolCircleDef::ClearCircles | ( | void | ) |
Removes all the circles in this symbol.
Definition at line 236 of file CigiBaseSymbolCircleDef.cpp.
References Circles, and CigiBaseVariableSizePckt::VariableDataSize.
00237 { 00238 CigiBaseCircleSymbolData *pCircle; 00239 vector<CigiBaseCircleSymbolData *>::iterator iCircle; 00240 for(iCircle=Circles.begin();iCircle!=Circles.end();iCircle++) 00241 { 00242 pCircle = *iCircle; 00243 if(pCircle != NULL) 00244 delete pCircle; 00245 } 00246 Circles.clear(); 00247 VariableDataSize = 0; 00248 }
CigiBaseCircleSymbolData * CigiBaseSymbolCircleDef::GetCircle | ( | int | CircleIndex, | |
bool | bndchk = true | |||
) |
Gets a pointer to a circle object.
CircleIndex | - The index of the desired circle. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 210 of file CigiBaseSymbolCircleDef.cpp.
References Circles.
00211 { 00212 CigiBaseCircleSymbolData * pCircle = NULL; 00213 00214 if((CircleIndex >= 0) && ((Cigi_uint8)CircleIndex < Circles.size())) 00215 { 00216 pCircle = Circles[CircleIndex]; 00217 } 00218 else 00219 { 00220 #ifndef CIGI_NO_BND_CHK 00221 if(bndchk) 00222 { 00223 #ifndef CIGI_NO_EXCEPT 00224 throw CigiValueOutOfRangeException("CircleIndex", (int)CircleIndex,0,Circles.size()); 00225 #endif 00226 } 00227 #endif 00228 } 00229 00230 return(pCircle); 00231 }
int CigiBaseSymbolCircleDef::GetCircleCount | ( | void | ) |
Gets the StipplePatternLen with bound checking control
Definition at line 202 of file CigiBaseSymbolCircleDef.cpp.
References Circles.
00203 { 00204 return(Circles.size()); 00205 }
int CigiBaseSymbolCircleDef::GetCnvt | ( | CigiVersionID & | CnvtVersion, | |
CigiCnvtInfoType::Type & | CnvtInfo | |||
) | [virtual] |
A virtual Conversion Information function. This function provides conversion information for this packet.
CnvtVersion | - The CIGI version to which this packet is being converted. | |
CnvtInfo | - The information needed for conversion |
Reimplemented from CigiBasePacket.
Definition at line 110 of file CigiBaseSymbolCircleDef.cpp.
References CIGI_SUCCESS, CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3, CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiVersionID::GetCombinedCigiVersion(), CigiCnvtInfoType::CigiCnvtInfoStruct::ProcID, CigiProcessType::ProcNone, and CigiProcessType::ProcStd.
00112 { 00113 if(CnvtVersion.GetCombinedCigiVersion() < 0x303) 00114 { 00115 CnvtInfo.ProcID = CigiProcessType::ProcNone; 00116 CnvtInfo.CnvtPacketID = 0; 00117 } 00118 else 00119 { 00120 CnvtInfo.ProcID = CigiProcessType::ProcStd; 00121 CnvtInfo.CnvtPacketID = CIGI_SYMBOL_CIRCLE_DEFINITION_PACKET_ID_V3_3; 00122 } 00123 00124 return(CIGI_SUCCESS); 00125 }
DrawingStyleGrp CigiBaseSymbolCircleDef::GetDrawingStyle | ( | void | ) | const [inline] |
Gets the DrawingStyle with bound checking control
Definition at line 200 of file CigiBaseSymbolCircleDef.h.
References DrawingStyle.
00200 { return(DrawingStyle); }
float CigiBaseSymbolCircleDef::GetLineWidth | ( | void | ) | const [inline] |
Gets the LineWidth with bound checking control
Definition at line 243 of file CigiBaseSymbolCircleDef.h.
References LineWidth.
00243 { return(LineWidth); }
Cigi_uint16 CigiBaseSymbolCircleDef::GetStipplePattern | ( | void | ) | const [inline] |
Gets the StipplePattern with bound checking control
Definition at line 223 of file CigiBaseSymbolCircleDef.h.
References StipplePattern.
00223 { return(StipplePattern); }
float CigiBaseSymbolCircleDef::GetStipplePatternLen | ( | void | ) | const [inline] |
Gets the StipplePatternLen with bound checking control
Definition at line 265 of file CigiBaseSymbolCircleDef.h.
References StipplePatternLen.
00265 { return(StipplePatternLen); }
Cigi_uint16 CigiBaseSymbolCircleDef::GetSymbolID | ( | void | ) | const [inline] |
Gets the SymbolID with bound checking control
Definition at line 181 of file CigiBaseSymbolCircleDef.h.
References SymbolID.
00181 { return(SymbolID); }
virtual int CigiBaseSymbolCircleDef::GetTruePacketSize | ( | CigiBaseVariableSizePckt & | refPacket | ) | [inline, virtual] |
A pure virtual function to determine the size that the packet will take up when packed. This function is not implemented in this class.
refPacket | - A pointer to the current pack point. |
Implements CigiBaseVariableSizePckt.
Definition at line 140 of file CigiBaseSymbolCircleDef.h.
References CigiBaseVariableSizePckt::GetVariableDataSize(), and CigiBasePacket::PacketSize.
00141 { return(PacketSize + refPacket.GetVariableDataSize()); }
CigiBaseSymbolCircleDef & CigiBaseSymbolCircleDef::operator= | ( | const CigiBaseSymbolCircleDef & | BaseIn | ) |
Assignment operator
Definition at line 93 of file CigiBaseSymbolCircleDef.cpp.
References DrawingStyle, LineWidth, StipplePattern, StipplePatternLen, and SymbolID.
00094 { 00095 SymbolID = BaseIn.SymbolID; 00096 DrawingStyle = BaseIn.DrawingStyle; 00097 StipplePattern = BaseIn.StipplePattern; 00098 LineWidth = BaseIn.LineWidth; 00099 StipplePatternLen = BaseIn.StipplePatternLen; 00100 00101 // The Circle Vector should be copied in the specific version class 00102 00103 return(*this); 00104 }
virtual int CigiBaseSymbolCircleDef::Pack | ( | CigiBasePacket * | Base, | |
Cigi_uint8 * | Buff, | |||
void * | Spec | |||
) | const [pure virtual] |
A pure virtual Pack function. This function is not implemented in this class.
Base | - A pointer to the instance of the packet to be packed. (Downcast to CigiBasePacket) | |
Buff | - A pointer to the current pack point. | |
Spec | - A pointer to special data. |
Implements CigiBaseVariableSizePckt.
Implemented in CigiSymbolCircleDefV3_3.
virtual int CigiBaseSymbolCircleDef::RemoveCircle | ( | int | CircleIndex, | |
bool | bndchk = true | |||
) | [pure virtual] |
A pure virtual Remove Circle function. This function is not implemented in this class. The implemented function will remove a Circle object from the Circle Vector.
CircleIndex | - The index of the circle to delete from this symbol. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Implemented in CigiSymbolCircleDefV3_3.
int CigiBaseSymbolCircleDef::SetDrawingStyle | ( | const DrawingStyleGrp | DrawingStyleIn, | |
bool | bndchk = true | |||
) |
Sets the DrawingStyle with bound checking control
DrawingStyleIn | - Specifies the drawing style for this symbol (Line, Fill) | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 136 of file CigiBaseSymbolCircleDef.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and DrawingStyle.
00137 { 00138 00139 #ifndef CIGI_NO_BND_CHK 00140 if(bndchk && ((DrawingStyleIn < 0)||(DrawingStyleIn > 1))) 00141 { 00142 #ifndef CIGI_NO_EXCEPT 00143 throw CigiValueOutOfRangeException("DrawingStyle", (int)DrawingStyleIn,0,1); 00144 #endif 00145 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00146 } 00147 #endif 00148 00149 DrawingStyle = DrawingStyleIn; 00150 00151 return(CIGI_SUCCESS); 00152 00153 }
int CigiBaseSymbolCircleDef::SetLineWidth | ( | const float | LineWidthIn, | |
bool | bndchk = true | |||
) |
Sets the LineWidth with bound checking control
LineWidthIn | - Specifies the line width for this symbol in Symbol Surface units. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 158 of file CigiBaseSymbolCircleDef.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and LineWidth.
00159 { 00160 00161 #ifndef CIGI_NO_BND_CHK 00162 if(bndchk && (LineWidthIn < 0.0)) 00163 { 00164 #ifndef CIGI_NO_EXCEPT 00165 throw CigiValueOutOfRangeException("LineWidth", (double)LineWidthIn,">=",0.0); 00166 #endif 00167 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00168 } 00169 #endif 00170 00171 LineWidth = LineWidthIn; 00172 00173 return(CIGI_SUCCESS); 00174 00175 }
int CigiBaseSymbolCircleDef::SetStipplePattern | ( | const Cigi_uint16 | StipplePatternIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the StipplePattern with bound checking control
StipplePatternIn | - Specifies the stipple pattern to be used with this symbol. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 213 of file CigiBaseSymbolCircleDef.h.
References CIGI_SUCCESS, and StipplePattern.
00214 { 00215 StipplePattern = StipplePatternIn; 00216 return(CIGI_SUCCESS); 00217 }
int CigiBaseSymbolCircleDef::SetStipplePatternLen | ( | const float | StipplePatternLenIn, | |
bool | bndchk = true | |||
) |
Sets the StipplePatternLen with bound checking control
StipplePatternLenIn | - Specifies the length in symbol surface units of the line that a single copy of the stipple pattern occupies. | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 180 of file CigiBaseSymbolCircleDef.cpp.
References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and StipplePatternLen.
00181 { 00182 00183 #ifndef CIGI_NO_BND_CHK 00184 if(bndchk && (StipplePatternLenIn < 0.0)) 00185 { 00186 #ifndef CIGI_NO_EXCEPT 00187 throw CigiValueOutOfRangeException("StipplePatternLen", (double)StipplePatternLenIn,">=",0.0); 00188 #endif 00189 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00190 } 00191 #endif 00192 00193 StipplePatternLen = StipplePatternLenIn; 00194 00195 return(CIGI_SUCCESS); 00196 00197 }
int CigiBaseSymbolCircleDef::SetSymbolID | ( | const Cigi_uint16 | SymbolIDIn, | |
bool | bndchk = true | |||
) | [inline] |
Sets the SymbolID with bound checking control
SymbolIDIn | - Specifies the ID number for this symbol | |
bndchk | - Enables (true) or disables (false) bounds checking. |
Definition at line 171 of file CigiBaseSymbolCircleDef.h.
References CIGI_SUCCESS, and SymbolID.
00172 { 00173 SymbolID = SymbolIDIn; 00174 return(CIGI_SUCCESS); 00175 }
virtual int CigiBaseSymbolCircleDef::Unpack | ( | Cigi_uint8 * | Buff, | |
bool | Swap, | |||
void * | Spec | |||
) | [pure virtual] |
A pure virtual Unpack function. This function is not implemented in this class.
Buff | - A pointer to the current pack point. | |
Swap | - N/A for V1 & V2 | |
Spec | - A pointer to special data. |
Implements CigiBaseVariableSizePckt.
Implemented in CigiSymbolCircleDefV3_3.
friend class CigiSymbolCircleDefV3_3 [friend] |
Definition at line 66 of file CigiBaseSymbolCircleDef.h.
std::vector<CigiBaseCircleSymbolData *> CigiBaseSymbolCircleDef::Circles [protected] |
Circles
A dynamic array of circles in this symbol
Definition at line 358 of file CigiBaseSymbolCircleDef.h.
Referenced by CigiSymbolCircleDefV3_3::AddCircle(), CigiSymbolCircleDefV3_3::CigiSymbolCircleDefV3_3(), ClearCircles(), GetCircle(), GetCircleCount(), CigiSymbolCircleDefV3_3::operator=(), CigiSymbolCircleDefV3_3::Pack(), CigiSymbolCircleDefV3_3::RemoveCircle(), CigiSymbolCircleDefV3_3::Unpack(), and ~CigiBaseSymbolCircleDef().
DrawingStyleGrp CigiBaseSymbolCircleDef::DrawingStyle [protected] |
DrawingStyle
The drawing style of this symbol.
Line
Fill
Definition at line 333 of file CigiBaseSymbolCircleDef.h.
Referenced by CigiBaseSymbolCircleDef(), CigiSymbolCircleDefV3_3::CigiSymbolCircleDefV3_3(), GetDrawingStyle(), CigiSymbolCircleDefV3_3::operator=(), operator=(), CigiSymbolCircleDefV3_3::Pack(), SetDrawingStyle(), and CigiSymbolCircleDefV3_3::Unpack().
float CigiBaseSymbolCircleDef::LineWidth [protected] |
LineWidth
The width of the line used in this symbol in symbol surface units.
Definition at line 345 of file CigiBaseSymbolCircleDef.h.
Referenced by CigiBaseSymbolCircleDef(), CigiSymbolCircleDefV3_3::CigiSymbolCircleDefV3_3(), GetLineWidth(), CigiSymbolCircleDefV3_3::operator=(), operator=(), CigiSymbolCircleDefV3_3::Pack(), SetLineWidth(), and CigiSymbolCircleDefV3_3::Unpack().
Cigi_uint16 CigiBaseSymbolCircleDef::StipplePattern [protected] |
StipplePattern
The binary Stipple Pattern to use on this symbol.
Definition at line 339 of file CigiBaseSymbolCircleDef.h.
Referenced by CigiBaseSymbolCircleDef(), CigiSymbolCircleDefV3_3::CigiSymbolCircleDefV3_3(), GetStipplePattern(), CigiSymbolCircleDefV3_3::operator=(), operator=(), CigiSymbolCircleDefV3_3::Pack(), SetStipplePattern(), and CigiSymbolCircleDefV3_3::Unpack().
float CigiBaseSymbolCircleDef::StipplePatternLen [protected] |
StipplePatternLen
The length in symbol surface units along the line that a single copy of the stipple pattern will occupy.
Definition at line 352 of file CigiBaseSymbolCircleDef.h.
Referenced by CigiBaseSymbolCircleDef(), CigiSymbolCircleDefV3_3::CigiSymbolCircleDefV3_3(), GetStipplePatternLen(), CigiSymbolCircleDefV3_3::operator=(), operator=(), CigiSymbolCircleDefV3_3::Pack(), SetStipplePatternLen(), and CigiSymbolCircleDefV3_3::Unpack().
Cigi_uint16 CigiBaseSymbolCircleDef::SymbolID [protected] |
SymbolID
The ID number of this symbol.
Definition at line 325 of file CigiBaseSymbolCircleDef.h.
Referenced by CigiBaseSymbolCircleDef(), CigiSymbolCircleDefV3_3::CigiSymbolCircleDefV3_3(), GetSymbolID(), CigiSymbolCircleDefV3_3::operator=(), operator=(), CigiSymbolCircleDefV3_3::Pack(), SetSymbolID(), and CigiSymbolCircleDefV3_3::Unpack().