mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:40:05 +00:00 
			
		
		
		
	Graphic alphanumeric block
This commit is contained in:
		
							parent
							
								
									09649c0fe7
								
							
						
					
					
						commit
						add6c41016
					
				
					 4 changed files with 251 additions and 11 deletions
				
			
		|  | @ -1,5 +1,6 @@ | |||
| #include <scwx/wsr88d/level3_file.hpp> | ||||
| #include <scwx/wsr88d/rpg/ccb_header.hpp> | ||||
| #include <scwx/wsr88d/rpg/graphic_alphanumeric_block.hpp> | ||||
| #include <scwx/wsr88d/rpg/level3_message_header.hpp> | ||||
| #include <scwx/wsr88d/rpg/product_description_block.hpp> | ||||
| #include <scwx/wsr88d/rpg/product_symbology_block.hpp> | ||||
|  | @ -39,14 +40,14 @@ public: | |||
|    bool LoadFileData(std::istream& is); | ||||
|    bool LoadBlocks(std::istream& is); | ||||
| 
 | ||||
|    std::shared_ptr<rpg::WmoHeader>               wmoHeader_; | ||||
|    std::shared_ptr<rpg::CcbHeader>               ccbHeader_; | ||||
|    std::shared_ptr<rpg::WmoHeader>               innerHeader_; | ||||
|    std::shared_ptr<rpg::Level3MessageHeader>     messageHeader_; | ||||
|    std::shared_ptr<rpg::ProductDescriptionBlock> descriptionBlock_; | ||||
|    std::shared_ptr<rpg::ProductSymbologyBlock>   symbologyBlock_; | ||||
|    std::shared_ptr<void>                         graphicBlock_; | ||||
|    std::shared_ptr<void>                         tabularBlock_; | ||||
|    std::shared_ptr<rpg::WmoHeader>                wmoHeader_; | ||||
|    std::shared_ptr<rpg::CcbHeader>                ccbHeader_; | ||||
|    std::shared_ptr<rpg::WmoHeader>                innerHeader_; | ||||
|    std::shared_ptr<rpg::Level3MessageHeader>      messageHeader_; | ||||
|    std::shared_ptr<rpg::ProductDescriptionBlock>  descriptionBlock_; | ||||
|    std::shared_ptr<rpg::ProductSymbologyBlock>    symbologyBlock_; | ||||
|    std::shared_ptr<rpg::GraphicAlphanumericBlock> graphicBlock_; | ||||
|    std::shared_ptr<void>                          tabularBlock_; | ||||
| }; | ||||
| 
 | ||||
| Level3File::Level3File() : p(std::make_unique<Level3FileImpl>()) {} | ||||
|  | @ -286,13 +287,19 @@ bool Level3FileImpl::LoadBlocks(std::istream& is) | |||
| 
 | ||||
|    if (offsetToGraphic >= offsetBase) | ||||
|    { | ||||
|       // TODO
 | ||||
|       graphicBlock_ = std::make_shared<rpg::GraphicAlphanumericBlock>(); | ||||
| 
 | ||||
|       is.seekg(offsetToGraphic - offsetBase, std::ios_base::cur); | ||||
|       graphicValid = graphicBlock_->Parse(is); | ||||
|       is.seekg(offsetBasePos, std::ios_base::beg); | ||||
| 
 | ||||
|       BOOST_LOG_TRIVIAL(debug) | ||||
|          << logPrefix_ | ||||
|          << "Graphic alphanumeric block found: " << offsetToGraphic; | ||||
|          << logPrefix_ << "Graphic alphanumeric block valid: " << graphicValid; | ||||
| 
 | ||||
|       if (!graphicValid) | ||||
|       { | ||||
|          graphicBlock_ = nullptr; | ||||
|       } | ||||
|    } | ||||
| 
 | ||||
|    if (offsetToTabular >= offsetBase) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat