text: /*
   * MainHeaderList.h
   *
   *  Created on: 2022/03/26
   *      Author: iizuka
   */
  
  #ifndef MAIN_HEADER_STORE_STORE_MAINHEADERLIST_H_
  #define MAIN_HEADER_STORE_STORE_MAINHEADERLIST_H_
  
  #include "filestore_block/IBlockObject.h"
  
  #include "base/RawArrayPrimitive.h"
  
  using namespace alinous;
  
  namespace codablecash {
  
  class MainHeaderList : public IBlockObject {
  public:
  	MainHeaderList(const MainHeaderList& inst);
  	MainHeaderList();
  	virtual ~MainHeaderList();
  
  	virtual int binarySize() const;
  	virtual void toBinary(ByteBuffer* out) const;
  	static MainHeaderList* fromBinary(ByteBuffer* in);
  
  	virtual IBlockObject* copyData() const noexcept;
  
  	void join(const MainHeaderList* value) noexcept;
  	bool contains(uint64_t value) const noexcept;
  	void remove(uint64_t value) noexcept;
  	int indexof(uint64_t value) const noexcept;
  
  	bool isEmpty() const noexcept;
  
  	void add(uint64_t value) noexcept;
  
  	int size() const noexcept;
  	uint64_t get(int pos) const noexcept;
  
  private:
  	RawArrayPrimitive<uint64_t> list; // list of fpos
  };
  
  } /* namespace codablecash */
  
  #endif /* MAIN_HEADER_STORE_STORE_MAINHEADERLIST_H_ */
  