473,692 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

My "Abstract Iterator"

Hi.

Let me introduce an iterator to you, the so-called "Abstract Iterator"
I developed the other day.

I actually have no idea if there's another "Abstract Iterator" out
there, as I have never looked for one on the net (I did browse the
boost library though). It doesn't matter right now, anyway.

To put it simply, Abstract Iterator is mainly a wrapper class. It helps
you implement some design decisions (though they are not many) you
couldn't implement otherwise. Here's a good example:

Let's say you are designing a database or something similar. Databases
have tables. You want those tables to be as flexible as possible - each
one with a different implementation. You design tables implemented with
std::vector, std::list and so on. There is, of course, an abstract data
type named 'Table'. You finally end up having this:

template<class Typeclass Table
{
public:
typedef Type value_type;
typedef ?? iterator;
typedef ?? const_iterator;

virtual void insert(iterator where,value_typ e const&)=0;
virtual void erase(iterator where)=0;
virtual void erase(iterator a,iterator b)=0;
virtual void clear()=0;
virtual std::size_t size() const=0;
virtual std::size_t max_size() const=0;
virtual iterator begin()=0;
virtual const_iterator begin() const=0;
virtual iterator end()=0;
virtual const_iterator end() const=0;
virtual ~Table() {}
};

template<class Typeclass Vector_table:
public Table<Type>
{
public:
typedef Type value_type;
typedef ?? iterator;
typedef ?? const_iterator;

void insert(iterator ,value_type const&);
void erase(iterator) ;
void erase(iterator, iterator);
void clear();
std::size_t size() const;
std::size_t max_size() const;
iterator begin();
const_iterator begin() const;
iterator end();
const_iterator end() const;
private:
std::vector<val ue_type c;
};

template<class Typeclass List_table:
public Table<Type>
{
public:
typedef Type value_type;
typedef ?? iterator;
typedef ?? const_iterator;

void insert(iterator ,value_type const&);
void erase(iterator) ;
void erase(iterator, iterator);
void clear();
std::size_t size() const;
std::size_t max_size() const;
iterator begin();
const_iterator begin() const;
iterator end();
const_iterator end() const;

private:
std::list<value _typec;
};

I have no idea how it was implemented, but I saw this option in
MySQL/Apache where you can choose a specific implementation for each
table at any time. I did not saw such an option in MS Access.

Anyway, we want to have the same nice flexibilty. We can't, though. As
you see, each derivation uses a different iterator. List_table uses
std::list<Type> ::iterator and Vector_table std::vector<Typ e>::iterater.
To make a function (like begin()) in a derivation virtual, it needs to
have an identical signature as the base class' function. That's not
possible with all those different iterators, though.

Giving all these iterators an identical interface & name should do the
trick. Let's call it abstract iterator, as it is some kind of
'abstract' (nobody cares what it is called anyway). And let's fill the
gap:

template<class Typeclass Table
{
public:
typedef Type value_type;
typedef abstract_iterat or<value_typeit erator;
typedef const_abstract_ iterator<value_ typeconst_itera tor;
...
};

template<class Typeclass Vector_table: public Table<Type>
{
public:
typedef Type value_type;
typedef abstract_iterat or<value_typeit erator;
typedef const_abstract_ iterator<value_ typeconst_itera tor;
...
};

template<class Typeclass List_table: public Table<Type>
{
public:
typedef Type value_type;
typedef abstract_iterat or<value_typeit erator;
typedef const_abstract_ iterator<value_ typeconst_itera tor;
...
};

That's all.

The Abstract Iterator can be used like this:

std::vector<int vec;
vec.push_back(3 );

abstract_iterat or<intai = vec.begin();

std::cout<<*ai< <std::endl;

std::list<intli ;
li.push_back(4) ;

ai = li.begin(); // ai is still the same object

std::cout<<*ai;

You may implement the begin() method like this:

// Please note: The type of Vector_table<Ty pe>::iterator is a typedef
to
// an abstract_iterat or<Type>
// c is an object of std::vector<Typ e>
template<class TypeVector_tabl e<Type>::iterat or
Vector_table<Ty pe>::begin()
{
return c.begin();
}

This convenience of wrapping any* iterator is not free of charge. The
Abstract Iterator is implemented using the Handle/Body idiom. Once the
Abstract Iterator wraps an iterator, that iterator can't be retrieved
anymore. _Unless_ you know its type:

// Please note: 'iterator' is a type of abstract_iterat or<Type>, which
wraps
// another std::vector<Typ e>::iterator.
template<class Typevoid Vector_table<Ty pe>::erase(iter ator where)
{
// We know what type 'where' is wrapping, as it is
// us doing the implementation of Vector_table.
c.erase(where.u nwrap<std::vect or<value_type>: :iterator>());
}

If the programmer happens to unwrap the wrong type, an exception will
be thrown.

Abstract Iterator has a fairly small interface in the first place. This
is what the public interface looks like:

template<class Typeclass abstract_iterat or:
public std::iterator<s td::bidirection al_iterator_tag ,Type>
{
public:
typedef Type value_type;
typedef Type& reference;
typedef Type const& const_reference ;
typedef Type* pointer;
typedef Type const* const_pointer;

abstract_iterat or();
abstract_iterat or(abstract_ite rator<value_typ econst&);
template<class Iteratorabstrac t_iterator(Iter ator const&);
~abstract_itera tor();

template<class Iteratorabstrac t_iterator<valu e_type>&
operator=(Itera tor const&);
abstract_iterat or<value_type>&
operator=(abstr act_iterator <value_typecons t&);

reference operator*();
const_reference operator*() const;

pointer operator->();
const_pointer operator->() const;

abstract_iterat or& operator++();
abstract_iterat or operator++(int) ;

abstract_iterat or& operator--();
abstract_iterat or operator--(int);

bool operator==(abst ract_iterator<v alue_typeconst& ) const;
bool operator==(cons t_abstract_iter ator<value_type const&) const;
bool operator!=(abst ract_iterator<v alue_typeconst& ) const;
bool operator!=(cons t_abstract_iter ator<value_type const&) const;

template<class Wrapped_iterato r>
Wrapped_iterato r& unwrap(); // might throw
template<class Wrapped_iterato r>
Wrapped_iterato r const& unwrap() const; // might throw
};

There is also a constant version called const_abstract_ iterator that
has almost the same public interface and, as the name suggests, a
stricter usage.

* Requirements of the wrapped type:

Whatever you wrap within an Abstract Iterator, make sure its public
interface supports the following operators:

operator*
operator->
operator++ (only the prefix operator is needed)
operator-- (only the prefix operator is needed)

More is not required.

It doesn't matter whether your type implements an operator== and/or an
operator!= method, as they are not needed by the Abstract Iterator.
Though the Abstract Iterator itself does provide both of these
comparison operations, the comparison is done in a different way and
does not require these operators from the wrapped type.

The wrapped type must be default constructable.

The wrapped type must be copyable.

You also need to switch on the RTTI compiler option.

********

There's a minor problem with the unwrap function of the
const_abstract_ iterator right now. Technically, it is possible to wrap
both a non-const iterator and a const_iterator within a
const_abstract_ iterator. It doesn't matter which type it is. _But_ it
does matter when it comes to unwrapping a iterator. Which one is
wrapped? You can either unwrap a non-const or an const_iterator, but
not both.

Principally, it should be possible to backtrack the actual type, I
think. But there might be some pitfalls that won't be allowing you to
do that. This problem needs to be fixed sooner or later.

********

So what do you think?

********

Here's the code anyway (from "abstract_itera tor.h"; may contain some
bugs; not the final version):

// RTTI is required.

#include <iterator>
#include <cassert>
#include <stdexcept>

class bad_ai_conversi on: public std::exception
{
public:
bad_ai_conversi on(): std::exception( "abstract iterator conversion
failed")
{
}
};

template<class Typeclass const_abstract_ iterator_base
{
public:
typedef Type value_type;
typedef const Type& const_reference ;
typedef const Type* const_pointer;

virtual const_reference operator*() const=0;
virtual const_pointer operator->() const=0;
virtual const_abstract_ iterator_base<v alue_type>& operator--()=0;
virtual const_abstract_ iterator_base<v alue_type>& operator++()=0;
virtual void const* get_value_addre ss() const=0;
virtual const_abstract_ iterator_base* factory() const=0;
virtual ~const_abstract _iterator_base( ) {}
};

template<class Typeclass abstract_iterat or_base:
public const_abstract_ iterator_base<T ype>
{
public:
typedef Type value_type;
typedef Type& reference;
typedef Type* pointer;

using const_abstract_ iterator_base<v alue_type>::ope rator*;
virtual reference operator*()=0;
using const_abstract_ iterator_base<v alue_type>::ope rator->;
virtual pointer operator->()=0;
};

template<class Type, class Iteratorclass
const_abstract_ iterator_impl:
public const_abstract_ iterator_base<T ype>
{
Iterator it;
public:
typedef Type value_type;
typedef Iterator iterator_type;
typedef const Type& const_reference ;
typedef const Type* const_pointer;

const_abstract_ iterator_impl(i terator_type const& ref)
:it(ref)
{
}
const_abstract_ iterator_impl(c onst_abstract_i terator_impl<va lue_type,iterat or_type>
const& aii)
:it(aii.it)
{
}

const_abstract_ iterator_impl<v alue_type,itera tor_type>& operator=
(const_abstract _iterator_impl< value_type,iter ator_typeconst&
aii)
{
it=aii.it;
}

const_reference operator*() const
{
return it.operator*();
}

const_pointer operator->() const
{
return it.operator->();
}

const_abstract_ iterator_base<v alue_type>& operator--()
{
--it;
return *this;
}

const_abstract_ iterator_base<v alue_type>& operator++()
{
++it;
return *this;
}

void const* get_value_addre ss() const
{
return &*it;
}

const_abstract_ iterator_base<v alue_type>* factory() const
{
return new
const_abstract_ iterator_impl<v alue_type,itera tor_type>(*this );
}

Iterator& get_iterator()
{
return it;
}

Iterator const& get_iterator() const
{
return it;
}
};

template<class Type, class Iteratorclass abstract_iterat or_impl:
public abstract_iterat or_base<Type>
{
Iterator it;
public:
typedef Type value_type;
typedef Iterator iterator_type;
typedef Type& reference;
typedef const Type& const_reference ;
typedef Type* pointer;
typedef const Type* const_pointer;

abstract_iterat or_impl(iterato r_type const& ref)
:it(ref)
{
}
abstract_iterat or_impl(abstrac t_iterator_impl <value_type,ite rator_type>
const& aii)
:it(aii.it)
{
}

abstract_iterat or_impl<value_t ype,iterator_ty pe>& operator=
(abstract_itera tor_impl<value_ type,iterator_t ypeconst& aii)
{
it=aii.it;
}

reference operator*()
{
return it.operator*();
}

const_reference operator*() const
{
return it.operator*();
}

pointer operator->()
{
return it.operator->();
}

const_pointer operator->() const
{
return it.operator->();
}

abstract_iterat or_base<value_t ype>& operator--()
{
--it;
return *this;
}

abstract_iterat or_base<value_t ype>& operator++()
{
++it;
return *this;
}

void const* get_value_addre ss() const
{
return &*it;
}

abstract_iterat or_base<value_t ype>* factory() const
{
return new
abstract_iterat or_impl<value_t ype,iterator_ty pe>(*this);
}

Iterator& get_iterator()
{
return it;
}

Iterator const& get_iterator() const
{
return it;
}
};

template<class Typeclass abstract_iterat or;

template<class Typeclass const_abstract_ iterator
//:public std::iterator<s td::bidirection al_iterator_tag ,Type>
{
public:
typedef Type value_type;
typedef const Type& const_reference ;
typedef const Type* const_pointer;

const_abstract_ iterator()
:base(0)
{
}

template<class Iteratorconst_a bstract_iterato r(Iterator const&
it)
:base(new const_abstract_ iterator_impl<t ypename
Iterator::value _type,Iterator> (it))
{
}

const_abstract_ iterator(const_ abstract_iterat or<value_typeco nst&
ai)
{
assert(ai.base) ;
base=ai.base->factory();
}

const_abstract_ iterator(abstra ct_iterator<val ue_typeconst&); //
See below for implementation

~const_abstract _iterator()
{
delete base;
}

template<class Iteratorconst_a bstract_iterato r<value_type>&
operator=(Itera tor const& it)
{
delete base;
base=new const_abstract_ iterator_impl<t ypename
Iterator::value _type,Iterator> (it);
return *this;
}

const_abstract_ iterator<value_ type>&
operator=(const _abstract_itera tor<value_typec onst& ai)
{
if(this==&ai)
return *this;
delete base;
base=ai.base->factory();
return *this;
}

const_abstract_ iterator<value_ type>&
operator=(abstr act_iterator<va lue_typeconst&) ;
// See below for implementation

const_reference operator*() const
{
assert(base);
return base->operator*();
}

const_pointer operator->() const
{
assert(base);
return base->operator->();
}

const_abstract_ iterator& operator++()
{
assert(base);
base->operator++() ;
return *this;
}

const_abstract_ iterator operator++(int)
{
assert(base);
const_abstract_ iterator temp(*this);
base->operator++() ;
return temp;
}

const_abstract_ iterator& operator--()
{
assert(base);
base->operator--();
return *this;
}

const_abstract_ iterator operator--(int)
{
assert(base);
const_abstract_ iterator temp(*this);
base->operator--();
return temp;
}

bool operator==(cons t_abstract_iter ator<value_type const& rhs)
const
{
assert(base);
assert(rhs.base );
return
base->get_value_addr ess()==rhs.base->get_value_addr ess();
}

bool operator!=(cons t_abstract_iter ator<value_type const& rhs)
const
{
assert(base);
assert(rhs.base );
return
base->get_value_addr ess()!=rhs.base->get_value_addr ess();
}

bool operator==(abst ract_iterator<v alue_typeconst& ) const; // See
below for implementation

bool operator!=(abst ract_iterator<v alue_typeconst& ) const; // See
below for implementation

template<class Wrapped_iterato rWrapped_iterat or& unwrap()
{
try
{
const_abstract_ iterator_impl<v alue_type,Wrapp ed_iterator>&
impl=

dynamic_cast<co nst_abstract_it erator_impl<val ue_type,Wrapped _iterator>&>(*b ase);
return impl.get_iterat or();
}
catch(std::bad_ cast)
{
throw bad_ai_conversi on();
}
}

template<class Wrapped_iterato rWrapped_iterat or const& unwrap()
const
{
try
{
const_abstract_ iterator_impl<v alue_type,Wrapp ed_iterator>
const& impl=

dynamic_cast<co nst_abstract_it erator_impl<val ue_type,Wrapped _iterator>
const&>(*base);
return impl.get_iterat or();
}
catch(std::bad_ cast)
{
throw bad_ai_conversi on();
}
}
private:
const_abstract_ iterator_base<v alue_type>* base;
template<class Tfriend class abstract_iterat or;
};

template<class Typeclass abstract_iterat or
//:public std::iterator<s td::bidirection al_iterator_tag ,Type>
{
public:
typedef Type value_type;
typedef Type& reference;
typedef const Type& const_reference ;
typedef Type* pointer;
typedef const Type* const_pointer;

abstract_iterat or()
:base(0)
{
}

template<class Iteratorabstrac t_iterator(Iter ator const& it)
:base(new abstract_iterat or_impl<typenam e
Iterator::value _type,Iterator> (it))
{
}

abstract_iterat or(abstract_ite rator<value_typ econst& ai)
{
assert(ai.base) ;

base=static_cas t<abstract_iter ator_base<value _type>*>(ai.bas e->factory());
}

~abstract_itera tor()
{
delete base;
}

template<class Iteratorabstrac t_iterator<valu e_type>&
operator=(Itera tor const& it)
{
delete base;
base=new abstract_iterat or_impl<typenam e
Iterator::value _type,Iterator> (it);
return *this;
}

abstract_iterat or<value_type>&
operator=(abstr act_iterator<va lue_typeconst& ai)
{
if(this==&ai)
return *this;
delete base;

base=static_cas t<abstract_iter ator_base<value _type>*>(ai.bas e->factory());
return *this;
}

reference operator*()
{
assert(base);
return base->operator*();
}

const_reference operator*() const
{
assert(base);
return base->operator*();
}

pointer operator->()
{
assert(base);
return base->operator->();
}

const_pointer operator->() const
{
assert(base);
return base->operator->();
}

abstract_iterat or& operator++()
{
assert(base);
base->operator++() ;
return *this;
}

abstract_iterat or operator++(int)
{
assert(base);
abstract_iterat or temp(*this);
base->operator++() ;
return temp;
}

abstract_iterat or& operator--()
{
assert(base);
base->operator--();
return *this;
}

abstract_iterat or operator--(int)
{
assert(base);
abstract_iterat or temp(*this);
base->operator--();
return temp;
}

bool operator==(abst ract_iterator<v alue_typeconst& rhs) const
{
assert(base);
assert(rhs.base );
return
base->get_value_addr ess()==rhs.base->get_value_addr ess();
}

bool operator!=(abst ract_iterator<v alue_typeconst& rhs) const
{
assert(base);
assert(rhs.base );
return
!(base->get_value_addr ess()==rhs.base->get_value_addr ess());
}

bool operator==(cons t_abstract_iter ator<value_type const& rhs)
const
{
assert(base);
assert(rhs.base );
return
base->get_value_addr ess()==rhs.base->get_value_addr ess();
}

bool operator!=(cons t_abstract_iter ator<value_type const& rhs)
const
{
assert(base);
assert(rhs.base );
return
!(base->get_value_addr ess()==rhs.base->get_value_addr ess());
}

template<class Wrapped_iterato rWrapped_iterat or& unwrap()
{
try
{
abstract_iterat or_impl<value_t ype,Wrapped_ite rator>& impl=

dynamic_cast<ab stract_iterator _impl<value_typ e,Wrapped_itera tor>&>(*base);
return impl.get_iterat or();
}
catch(std::bad_ cast)
{
throw bad_ai_conversi on();
}
}

template<class Wrapped_iterato rWrapped_iterat or const& unwrap()
const
{
try
{
abstract_iterat or_impl<value_t ype,Wrapped_ite ratorconst&
impl=

dynamic_cast<ab stract_iterator _impl<value_typ e,Wrapped_itera tor>
const&>(*base);
return impl.get_iterat or();
}
catch(std::bad_ cast)
{
throw bad_ai_conversi on();
}
}
private:
abstract_iterat or_base<value_t ype>* base;
abstract_iterat or(const_abstra ct_iterator<val ue_typeconst&);
abstract_iterat or& operator=(const _abstract_itera tor<value_type>
const&);
template<class Tfriend class const_abstract_ iterator;
};

template<class Typeinline const_abstract_ iterator<Type>: :
const_abstract_ iterator(abstra ct_iterator<val ue_typeconst& ai)
{
assert(ai.base) ;
base=ai.base->factory();
}

template<class Typeinline const_abstract_ iterator<Type>&
const_abstract_ iterator<Type>: :operator=(abst ract_iterator<v alue_type>
const& rhs)
{
assert(rhs.base );
delete base;
base=rhs.base->factory();
return *this;
}

template<class Typeinline bool const_abstract_ iterator<Type>: :
operator==(abst ract_iterator<v alue_typeconst& rhs) const
{
assert(base);
assert(rhs.base );
return base->get_value_addr ess()==rhs.base->get_value_addr ess();
}

template<class Typeinline bool const_abstract_ iterator<Type>: :
operator!=(abst ract_iterator<v alue_typeconst& rhs) const
{
assert(base);
assert(rhs.base );
return base->get_value_addr ess()!=rhs.base->get_value_addr ess();
}

// Comparison operations for non-abstract iterators:

template <class Another_iterato r, class Typeinline bool
operator==(Anot her_iterator const& lhs, abstract_iterat or<Typeconst&
rhs)
{
// It is safer to make rhs a const_abstract_ iterator rather than a
non-const one,
// for rhs may be a const iterator itself.
const_abstract_ iterator<Typete mp(lhs);
return temp==rhs;
}

template <class Another_iterato r, class Typeinline bool
operator==(abst ract_iterator<T ypeconst& lhs, Another_iterato r const&
rhs)
{
const_abstract_ iterator<Typete mp(rhs);
return lhs==temp;
}

template <class Another_iterato r, class Typeinline bool
operator!=(Anot her_iterator const& lhs, abstract_iterat or<Typeconst&
rhs)
{
const_abstract_ iterator<Typete mp(lhs);
return temp!=rhs;
}

template <class Another_iterato r, class Typeinline bool
operator!=(abst ract_iterator<T ypeconst& lhs, Another_iterato r const&
rhs)
{
const_abstract_ iterator<Typete mp(rhs);
return lhs!=temp;
}

template <class Another_iterato r, class Typeinline bool
operator==(Anot her_iterator const& lhs, const_abstract_ iterator<Type>
const& rhs)
{
const_abstract_ iterator<Typete mp(lhs);
return temp==rhs;
}

template <class Another_iterato r, class Typeinline bool
operator==(cons t_abstract_iter ator<Typeconst& lhs, Another_iterato r
const& rhs)
{
const_abstract_ iterator<Typete mp(rhs);
return lhs==temp;
}

template <class Another_iterato r, class Typeinline bool
operator!=(Anot her_iterator const& lhs, const_abstract_ iterator<Type>
const& rhs)
{
const_abstract_ iterator<Typete mp(lhs);
return temp!=rhs;
}

template <class Another_iterato r, class Typeinline bool
operator!=(cons t_abstract_iter ator<Typeconst& lhs, Another_iterato r
const& rhs)
{
const_abstract_ iterator<Typete mp(rhs);
return lhs!=temp;
}

Sep 16 '06 #1
0 2675

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
5070
by: Mike Austin | last post by:
Hi all. Just working on a small virtual machine, and thought about using vector iterators instead of pointer arithmetic. Question is, why does an iterator plus any number out of range not generate a out_of_range exception? Maybe this is a gcc issue? I'm using gcc version 3.3.3 (cygwin special). Here's the full sample code: #include <iostream>
2
1384
by: Ben Fidge | last post by:
I've got a couple of UserControls that are derived from a common base-class. When I try to open them in the IDE, the following error is displayed in a dialog window: "The file failed to load in the Web Form designer. Please correct the following error, then load it again: Type Abstract" This has only just started happening, as I've had the inheritance working for a good week or so now. I've no
8
4039
by: Asfand Yar Qazi | last post by:
Hi, I have the following header file in my 'everything useful I think of in one place' library: ============= BEGIN CODE SNIPPET =========== /** All classes that derive from this obtain a 'virtual constructor' - ie if the 'clone()' method is called on a polymorphic type, an object of the same (unknown) type is returned. */
4
1766
by: J.M. | last post by:
I have a question concerning inheritance: can an abstract (parent) class have an abstract object? I would like to make a concrete child inherit from this class by inheriting from this object. Let me try to make this clear by example: The following should be "abstract". "class motor" is abstract because it has a virtual member "virtual int calculate_horsepower() = 0" "class car" should have "motor M;"
0
1250
by: Ken Varn | last post by:
I have the following code that I cannot get to compile. I get the error "A Sealed class cannot be abstract." public __value struct DVRAVIFileHeader : public ISerializable { double EventID; String *EventName; USHORT EventNum; String *EventType;
4
5698
by: arnuld | last post by:
i wrote a programme to create a vector of 5 elements (0 to 4), here is the code & output: #include <iostream> #include <vector> int main() { std::vector<intivec; // dynamically create a vector
3
3471
by: Lord0 | last post by:
I am trying to implement variable content containers using an abstract type and type substitution. My schema is as follows: <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:this="this" targetNamespace="this" elementFormDefault="qualified"> <complexType name="abstractAnswerType" abstract="true"/> <complexType name="yesWithDescType">
2
2857
by: dkmd_nielsen | last post by:
I have two rather simple class methods coded in Ruby...my own each iterator: The iterator is used internally within the class/namespace, and be available externally. That way I can keep everything hidden about the "instructions table." # Loop through each instruction in the block, yielding the result from # the specified code block. def each(&logic) @instructions.each {|instr| yield instr} end
0
8603
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8538
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9083
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8797
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6459
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5818
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4323
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4557
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.